diff options
author | planetmaker <planetmaker@openttd.org> | 2013-07-11 19:57:40 +0000 |
---|---|---|
committer | planetmaker <planetmaker@openttd.org> | 2013-07-11 19:57:40 +0000 |
commit | 4a1bf704ee1d8de386fe9f5b5fd87a46fb7bb615 (patch) | |
tree | ed4438e49d3c85d2d2e1680a7303618dd1e45371 /src/network/core | |
parent | 09a30ca7b5a1a6ddbd47fe062b0982f599c17284 (diff) | |
download | openttd-4a1bf704ee1d8de386fe9f5b5fd87a46fb7bb615.tar.xz |
(svn r25587) -Add FS#5643: Conclude rcon output sent to admin clients with an RCON_END packet (Xaroth)
Diffstat (limited to 'src/network/core')
-rw-r--r-- | src/network/core/tcp_admin.cpp | 2 | ||||
-rw-r--r-- | src/network/core/tcp_admin.h | 9 |
2 files changed, 11 insertions, 0 deletions
diff --git a/src/network/core/tcp_admin.cpp b/src/network/core/tcp_admin.cpp index 027159883..e87dd5924 100644 --- a/src/network/core/tcp_admin.cpp +++ b/src/network/core/tcp_admin.cpp @@ -87,6 +87,7 @@ NetworkRecvStatus NetworkAdminSocketHandler::HandlePacket(Packet *p) case ADMIN_PACKET_SERVER_CONSOLE: return this->Receive_SERVER_CONSOLE(p); case ADMIN_PACKET_SERVER_CMD_NAMES: return this->Receive_SERVER_CMD_NAMES(p); case ADMIN_PACKET_SERVER_CMD_LOGGING: return this->Receive_SERVER_CMD_LOGGING(p); + case ADMIN_PACKET_SERVER_RCON_END: return this->Receive_SERVER_RCON_END(p); default: if (this->HasClientQuit()) { @@ -162,5 +163,6 @@ NetworkRecvStatus NetworkAdminSocketHandler::Receive_SERVER_RCON(Packet *p) { re NetworkRecvStatus NetworkAdminSocketHandler::Receive_SERVER_CONSOLE(Packet *p) { return this->ReceiveInvalidPacket(ADMIN_PACKET_SERVER_CONSOLE); } NetworkRecvStatus NetworkAdminSocketHandler::Receive_SERVER_CMD_NAMES(Packet *p) { return this->ReceiveInvalidPacket(ADMIN_PACKET_SERVER_CMD_NAMES); } NetworkRecvStatus NetworkAdminSocketHandler::Receive_SERVER_CMD_LOGGING(Packet *p) { return this->ReceiveInvalidPacket(ADMIN_PACKET_SERVER_CMD_LOGGING); } +NetworkRecvStatus NetworkAdminSocketHandler::Receive_SERVER_RCON_END(Packet *p) { return this->ReceiveInvalidPacket(ADMIN_PACKET_SERVER_RCON_END); } #endif /* ENABLE_NETWORK */ diff --git a/src/network/core/tcp_admin.h b/src/network/core/tcp_admin.h index 932c3af42..d642deb4c 100644 --- a/src/network/core/tcp_admin.h +++ b/src/network/core/tcp_admin.h @@ -60,6 +60,7 @@ enum PacketAdminType { ADMIN_PACKET_SERVER_CMD_NAMES, ///< The server sends out the names of the DoCommands to the admins. ADMIN_PACKET_SERVER_CMD_LOGGING, ///< The server gives the admin copies of incoming command packets. ADMIN_PACKET_SERVER_GAMESCRIPT, ///< The server gives the admin information from the GameScript in JSON. + ADMIN_PACKET_SERVER_RCON_END, ///< The server indicates that the remote console command has completed. INVALID_ADMIN_PACKET = 0xFF, ///< An invalid marker for admin packets. }; @@ -454,6 +455,14 @@ protected: */ virtual NetworkRecvStatus Receive_SERVER_CMD_LOGGING(Packet *p); + /** + * Notify the admin connection that the rcon command has finished. + * string The command as requested by the admin connection. + * @param p The packet that was just received. + * @return The state the network should have. + */ + virtual NetworkRecvStatus Receive_SERVER_RCON_END(Packet *p); + NetworkRecvStatus HandlePacket(Packet *p); public: NetworkRecvStatus CloseConnection(bool error = true); |