diff options
| author | XTZGZoReX <none@none> | 2009-03-21 13:51:28 +0100 |
|---|---|---|
| committer | XTZGZoReX <none@none> | 2009-03-21 13:51:28 +0100 |
| commit | 55695eda786667a34d6c0ae59496d787dfba4b3e (patch) | |
| tree | 3d62e720455cef466b992a5055cfb115c6392403 /src/game/WorldSocket.cpp | |
| parent | bab99cedba0217e050708e4d8eb8868fb7596343 (diff) | |
* Implement ".server set closed on/off" command to allow/deny new connections to the world.
--HG--
branch : trunk
Diffstat (limited to 'src/game/WorldSocket.cpp')
| -rw-r--r-- | src/game/WorldSocket.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/game/WorldSocket.cpp b/src/game/WorldSocket.cpp index 0f975cf776f..dd2d2d93f1f 100644 --- a/src/game/WorldSocket.cpp +++ b/src/game/WorldSocket.cpp @@ -764,6 +764,16 @@ int WorldSocket::HandleAuthSession (WorldPacket& recvPacket) return -1; } + if(sWorld.IsClosed()) + { + packet.Initialize(SMSG_AUTH_RESPONSE, 1); + packet << uint8(AUTH_REJECT); + SendPacket (packet); + + sLog.outError ("WorldSocket::HandleAuthSession: World closed, denying client (%s).", m_Session->GetRemoteAddress()); + return -1; + } + // Read the content of the packet recvPacket >> BuiltNumberClient; // for now no use recvPacket >> unk2; |
