Posts: 382
Threads: 1
Joined: Nov 2007
Reputation:
0
In OnPlayerDisconnect or OnPlayerConnect, do you reset the player's admin level?
Posts: 2,862
Threads: 11
Joined: Mar 2008
Reputation:
0
Possible SQL injection? You could also tell us how your account system work.
Posts: 303
Threads: 68
Joined: Dec 2008
Reputation:
0
Everything on connect and disconnect is reset. And al seems to work fine. Then after a couple of hours it just goes crazy..
Admins cant ban, players cant login, and their accounts appear unregistered.
I re-hashed the passwords using whirlpool, which seems to be ok now... But im not sure why the accounts and bans stop working after so long
Posts: 382
Threads: 1
Joined: Nov 2007
Reputation:
0
Try using mysql_escape_string with every user input you use, or basicly every inpute / update query.
Posts: 303
Threads: 68
Joined: Dec 2008
Reputation:
0
if something needs doing, i have it open the database, update, insert or query...
Then close the database.
I tried it opening it from when the gamemode starts, and closing the database when the gamemode exits.. But still had the same problems.
I'm gonna go back to dini for now until i write something else with another database format... SQLite isn't impressing me at all.
Posts: 303
Threads: 68
Joined: Dec 2008
Reputation:
0
Everything was working perfectly fine, then suddenly it goes crazy..
With the old account system i used, there was no such problems.
I don't pretend to fully understand sql, i tried learning it and wrote an account and ban system that seems to work perfect, for a few hours.
Then any command that requires the database suddenly stops working...
I have around 1300 lines of code for the database in a sepperate file... If anyone with great knowledge on SQL is willing to help me and would like to take a look please PM me.
Posts: 79
Threads: 5
Joined: May 2006
Reputation:
0
Sounds like the database is locked, maybe you're forgetting to end a transaction somewhere.