diff options
| author | DJScias <DJScias@gmail.com> | 2015-05-30 03:06:59 +0200 |
|---|---|---|
| committer | DJScias <DJScias@gmail.com> | 2015-05-30 03:06:59 +0200 |
| commit | 709b77f9e81f690539e678cb9d7eaa5460fe585b (patch) | |
| tree | 42178239ecc029e6904eec109920ba8cd5bd2b26 /src | |
| parent | 1987d3187d1f14cf6dfcaf4f63861db806ad06cc (diff) | |
Core/DBLayer: proper 6x account unban
- Thanks @Shauren
- Unbanning accounts in 6x should set unbandate = now
(UNIX_TIMESTAMP() instead of NOW() due to unbandate being an int, not a timestamp)
- 'Active' updates remain so the "account is not banned" checks continue functioning
Diffstat (limited to 'src')
| -rw-r--r-- | 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 70350f3136c..99d6cb7af50 100644 --- a/src/server/shared/Database/Implementation/LoginDatabase.cpp +++ b/src/server/shared/Database/Implementation/LoginDatabase.cpp @@ -46,7 +46,7 @@ void LoginDatabaseConnection::DoPrepareStatements() PrepareStatement(LOGIN_INS_IP_BANNED, "INSERT INTO ip_banned (ip, bandate, unbandate, bannedby, banreason) VALUES (?, UNIX_TIMESTAMP(), UNIX_TIMESTAMP()+?, ?, ?)", CONNECTION_ASYNC); PrepareStatement(LOGIN_DEL_IP_NOT_BANNED, "DELETE FROM ip_banned WHERE ip = ?", CONNECTION_ASYNC); PrepareStatement(LOGIN_INS_ACCOUNT_BANNED, "INSERT INTO account_banned VALUES (?, UNIX_TIMESTAMP(), UNIX_TIMESTAMP()+?, ?, ?, 1)", CONNECTION_ASYNC); - PrepareStatement(LOGIN_UPD_ACCOUNT_NOT_BANNED, "UPDATE account_banned SET active = 0 WHERE id = ? AND active != 0", CONNECTION_ASYNC); + PrepareStatement(LOGIN_UPD_ACCOUNT_NOT_BANNED, "UPDATE account_banned SET unbandate = UNIX_TIMESTAMP(), active = 0 WHERE id = ? AND active != 0", CONNECTION_ASYNC); PrepareStatement(LOGIN_DEL_REALM_CHARACTERS_BY_REALM, "DELETE FROM realmcharacters WHERE acctid = ? AND realmid = ?", CONNECTION_ASYNC); PrepareStatement(LOGIN_DEL_REALM_CHARACTERS, "DELETE FROM realmcharacters WHERE acctid = ?", CONNECTION_ASYNC); PrepareStatement(LOGIN_INS_REALM_CHARACTERS, "INSERT INTO realmcharacters (numchars, acctid, realmid) VALUES (?, ?, ?)", CONNECTION_ASYNC); |
