diff options
author | leak <none@none> | 2010-12-23 06:15:53 +0100 |
---|---|---|
committer | leak <none@none> | 2010-12-23 06:15:53 +0100 |
commit | 2ee9a528ca3a18fd8869695d72ea3c54fbca8aa6 (patch) | |
tree | b503e4a804ab1f553fc364772e8c137c334c759e | |
parent | 067984ba9f63177763e2696399bdef1a0d1b61a5 (diff) |
Core/AuthServer: Little query tuning. Query by linencloth.
--HG--
branch : trunk
-rwxr-xr-x | src/server/shared/Database/Implementation/LoginDatabase.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/server/shared/Database/Implementation/LoginDatabase.cpp b/src/server/shared/Database/Implementation/LoginDatabase.cpp index 52911ce09a9..9487dec3ae5 100755 --- a/src/server/shared/Database/Implementation/LoginDatabase.cpp +++ b/src/server/shared/Database/Implementation/LoginDatabase.cpp @@ -32,7 +32,7 @@ bool LoginDatabaseConnection::Open() */ PrepareStatement(LOGIN_GET_REALMLIST, "SELECT id, name, address, port, icon, color, timezone, allowedSecurityLevel, population, gamebuild FROM realmlist WHERE color <> 3 ORDER BY name"); PrepareStatement(LOGIN_SET_EXPIREDIPBANS, "DELETE FROM ip_banned WHERE unbandate<=UNIX_TIMESTAMP() AND unbandate<>bandate", true); - PrepareStatement(LOGIN_SET_EXPIREDACCBANS, "UPDATE account_banned SET active = 0 WHERE unbandate<=UNIX_TIMESTAMP() AND unbandate<>bandate", true); + PrepareStatement(LOGIN_SET_EXPIREDACCBANS, "UPDATE account_banned SET active = 0 WHERE active = 1 AND unbandate<=UNIX_TIMESTAMP() AND unbandate<>bandate", true); PrepareStatement(LOGIN_GET_IPBANNED, "SELECT * FROM ip_banned WHERE ip = ?"); PrepareStatement(LOGIN_SET_IPAUTOBANNED, "INSERT INTO ip_banned VALUES (?, UNIX_TIMESTAMP(), UNIX_TIMESTAMP()+?,'Trinity realmd', 'Failed login autoban')", true); PrepareStatement(LOGIN_GET_ACCBANNED, "SELECT bandate,unbandate FROM account_banned WHERE id = ? AND active = 1"); |