diff --git a/bot/net/netgame.cpp b/bot/net/netgame.cpp index e4aac29..56d6b19 100644 --- a/bot/net/netgame.cpp +++ b/bot/net/netgame.cpp @@ -307,6 +307,9 @@ void CNetGame::UpdateNetwork() case ID_CONNECTION_LOST: Packet_ConnectionLost(pkt); break; + case ID_INVALID_PASSWORD: + Packet_InvalidPassword(pkt); + break; case ID_MODIFIED_PACKET: Packet_ModifiedPacket(pkt); break; @@ -436,6 +439,15 @@ void CNetGame::Packet_ConnectionLost(Packet* packet) //---------------------------------------------------- +void CNetGame::Packet_InvalidPassword(Packet* packet) +{ + //logprintf("NPC: Wrong server password."); + m_pRakClient->Disconnect(0); + exit(1); +} + +//---------------------------------------------------- + void CNetGame::Packet_ModifiedPacket(Packet* packet) { } diff --git a/bot/net/netgame.h b/bot/net/netgame.h index cb34223..79df549 100644 --- a/bot/net/netgame.h +++ b/bot/net/netgame.h @@ -31,6 +31,7 @@ private: void Packet_NoFreeIncomingConnections(Packet* packet); void Packet_DisconnectionNotification(Packet* packet); void Packet_ConnectionLost(Packet* packet); + void Packet_InvalidPassword(Packet* packet); void Packet_ModifiedPacket(Packet* packet); void Packet_ConnectAttemptFailed(Packet* packet); void Packet_TrailerSync(Packet *p);