bool packet000_VersionPacket(CIOSocket* pSocket, const uint8_t* packet)
{
guard(__FUNCTIONW__);
int clientProtocolRevision = 0;
PacketUtils::Disassemble(packet, "d", &clientProtocolRevision);
if (clientProtocolRevision == -1)
{
return false;
}
CUserSocket* socket = static_cast<CUserSocket*>(pSocket);
if (clientProtocolRevision == -2)
{
socket->Send("cd", ServerToClientPacket_AdminSocket, 1);
if (socket->IsUserSocket())
{
socket->SetSomeDebugInfo(true);
}
return true;
}
if (clientProtocolRevision == -3)
{
wchar_t buffer[0x100] = {0};
DumpServerStats(buffer);
if (g_npcServer.GetSocketCount() <= 0)
{
socket->Send("cdddddS", ServerToClientPacket_AdminSocket, 2, CServerStatistic::s_maxUsers, CServerStatistic::s_usersConnected, CServerStatistic::s_usersPlaying, CServerStatistic::s_privateStores, buffer);
}
else
{
socket->Send("cdddddS", ServerToClientPacket_AdminSocket, 1, CServerStatistic::s_maxUsers, CServerStatistic::s_usersConnected, CServerStatistic::s_usersPlaying, CServerStatistic::s_privateStores, buffer);
}
return false;
}
//...