aboutsummaryrefslogtreecommitdiff
path: root/src/game/WorldSocket.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/game/WorldSocket.cpp')
-rw-r--r--src/game/WorldSocket.cpp11
1 files changed, 4 insertions, 7 deletions
diff --git a/src/game/WorldSocket.cpp b/src/game/WorldSocket.cpp
index 0413f197877..d3f66c39d61 100644
--- a/src/game/WorldSocket.cpp
+++ b/src/game/WorldSocket.cpp
@@ -804,13 +804,10 @@ int WorldSocket::HandleAuthSession (WorldPacket& recvPacket)
// Re-check account ban (same check as in realmd)
QueryResult *banresult =
- loginDatabase.PQuery ("SELECT "
- "bandate, "
- "unbandate "
- "FROM account_banned "
- "WHERE id = '%u' "
- "AND active = 1",
- id);
+ loginDatabase.PQuery ("SELECT 1 FROM account_banned WHERE id = %u AND active = 1 "
+ "UNION "
+ "SELECT 1 FROM ip_banned WHERE ip = '%s'",
+ id, GetRemoteAddress().c_str());
if (banresult) // if account banned
{