* Implement ".server set closed on/off" command to allow/deny new connections to the world.

--HG--
branch : trunk
This commit is contained in:
XTZGZoReX
2009-03-21 13:51:28 +01:00
parent bab99cedba
commit 55695eda78
10 changed files with 58 additions and 2 deletions

View File

@@ -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;