summaryrefslogtreecommitdiff
path: root/src/network/core/tcp_admin.cpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2011-10-15 20:42:32 +0000
committerrubidium <rubidium@openttd.org>2011-10-15 20:42:32 +0000
commitde27205e6c8aec594f7ae3b8205e8a1d60c24751 (patch)
tree84a180f9001812109677d95c57ee446178dada0d /src/network/core/tcp_admin.cpp
parent16e1314f58fa96915d79ca8419465ab2e5e8639e (diff)
downloadopenttd-de27205e6c8aec594f7ae3b8205e8a1d60c24751.tar.xz
(svn r23031) -Fix [FS#4804]: for the admin "bots" there was no distinction between bankruptcy and manual removal of companies even though the API suggested that
Diffstat (limited to 'src/network/core/tcp_admin.cpp')
-rw-r--r--src/network/core/tcp_admin.cpp20
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);