diff options
Diffstat (limited to 'src/network/core/tcp_admin.cpp')
-rw-r--r-- | src/network/core/tcp_admin.cpp | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/src/network/core/tcp_admin.cpp b/src/network/core/tcp_admin.cpp index 077ac3048..fbf9ac580 100644 --- a/src/network/core/tcp_admin.cpp +++ b/src/network/core/tcp_admin.cpp @@ -19,6 +19,12 @@ #include "tcp_admin.h" #include "../../debug.h" +/* Make sure that these enums match. */ +assert_compile((int)CRR_MANUAL == (int)ADMIN_CRR_MANUAL); +assert_compile((int)CRR_AUTOCLEAN == (int)ADMIN_CRR_AUTOCLEAN); +assert_compile((int)CRR_BANKRUPT == (int)ADMIN_CRR_BANKRUPT); +assert_compile((int)CRR_END == (int)ADMIN_CRR_END); + /** * Create the admin handler for the given socket. * @param s The socket to communicate over. @@ -55,13 +61,13 @@ NetworkRecvStatus NetworkAdminSocketHandler::HandlePacket(Packet *p) case ADMIN_PACKET_ADMIN_CHAT: return this->Receive_ADMIN_CHAT(p); case ADMIN_PACKET_ADMIN_RCON: return this->Receive_ADMIN_RCON(p); - case ADMIN_PACKET_SERVER_FULL: return this->Receive_SERVER_FULL(p); - case ADMIN_PACKET_SERVER_BANNED: return this->Receive_SERVER_BANNED(p); - case ADMIN_PACKET_SERVER_ERROR: return this->Receive_SERVER_ERROR(p); - case ADMIN_PACKET_SERVER_PROTOCOL: return this->Receive_SERVER_PROTOCOL(p); - case ADMIN_PACKET_SERVER_WELCOME: return this->Receive_SERVER_WELCOME(p); - case ADMIN_PACKET_SERVER_NEWGAME: return this->Receive_SERVER_NEWGAME(p); - case ADMIN_PACKET_SERVER_SHUTDOWN: return this->Receive_SERVER_SHUTDOWN(p); + case ADMIN_PACKET_SERVER_FULL: return this->Receive_SERVER_FULL(p); + case ADMIN_PACKET_SERVER_BANNED: return this->Receive_SERVER_BANNED(p); + case ADMIN_PACKET_SERVER_ERROR: return this->Receive_SERVER_ERROR(p); + case ADMIN_PACKET_SERVER_PROTOCOL: return this->Receive_SERVER_PROTOCOL(p); + case ADMIN_PACKET_SERVER_WELCOME: return this->Receive_SERVER_WELCOME(p); + case ADMIN_PACKET_SERVER_NEWGAME: return this->Receive_SERVER_NEWGAME(p); + case ADMIN_PACKET_SERVER_SHUTDOWN: return this->Receive_SERVER_SHUTDOWN(p); case ADMIN_PACKET_SERVER_DATE: return this->Receive_SERVER_DATE(p); case ADMIN_PACKET_SERVER_CLIENT_JOIN: return this->Receive_SERVER_CLIENT_JOIN(p); |