fixed banresult

This commit is contained in:
GiantCrocodile 2014-03-25 19:12:22 +01:00 committed by Antz
parent 4c00026849
commit 405cb22058

View file

@ -421,8 +421,8 @@ bool AuthSocket::_HandleLogonChallenge()
if (!locked) if (!locked)
{ {
///- If the account is banned, reject the logon attempt ///- If the account is banned, reject the logon attempt
QueryResult* banresult = LoginDatabase.PQuery("SELECT bandate,unbandate FROM account_banned WHERE " QueryResult* banresult = LoginDatabase.PQuery("SELECT bandate,unbandate FROM account_banned WHERE
"id = %u AND active = 1 AND (unbandate > UNIX_TIMESTAMP() OR unbandate = bandate)", (*result)[1].GetUInt32()); id = %u AND active = '1' AND (unbandate > UNIX_TIMESTAMP() OR unbandate = bandate)", (*result)[1].GetUInt32());
if (banresult) if (banresult)
{ {
if ((*banresult)[0].GetUInt64() == (*banresult)[1].GetUInt64()) if ((*banresult)[0].GetUInt64() == (*banresult)[1].GetUInt64())