[8855] fixed banproblem after [8823]

so only realmd accepted login but mangosd haven't done it
thx to the_game_master for pointing it out :)
This commit is contained in:
balrok 2009-11-21 16:23:15 +01:00
parent aa759d8161
commit c057ac987d
2 changed files with 3 additions and 3 deletions

View file

@ -845,9 +845,9 @@ int WorldSocket::HandleAuthSession (WorldPacket& recvPacket)
// Re-check account ban (same check as in realmd)
QueryResult *banresult =
loginDatabase.PQuery ("SELECT 1 FROM account_banned WHERE id = %u AND active = 1 "
loginDatabase.PQuery ("SELECT 1 FROM account_banned WHERE id = %u AND active = 1 AND (unbandate > UNIX_TIMESTAMP() OR unbandate = bandate)"
"UNION "
"SELECT 1 FROM ip_banned WHERE ip = '%s'",
"SELECT 1 FROM ip_banned WHERE (unbandate = bandate OR unbandate > UNIX_TIMESTAMP()) AND ip = '%s'",
id, GetRemoteAddress().c_str());
if (banresult) // if account banned

View file

@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__
#define __REVISION_NR_H__
#define REVISION_NR "8854"
#define REVISION_NR "8855"
#endif // __REVISION_NR_H__