diff options
author | dP <dp@dpointer.org> | 2021-09-20 00:09:06 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-09-19 23:09:06 +0200 |
commit | 31cf9e888b1129ed8147a0ce1ee0bdbf7c121c9b (patch) | |
tree | 05a706ddc8b269445c4ea3b28959690b7774ae32 /src/network/core/tcp_admin.h | |
parent | d9f8ed7bdf5de55b339636f96d8958d04e6d6c6c (diff) | |
download | openttd-31cf9e888b1129ed8147a0ce1ee0bdbf7c121c9b.tar.xz |
Add: [Network] external chat messages for remote admins (#9563)
Diffstat (limited to 'src/network/core/tcp_admin.h')
-rw-r--r-- | src/network/core/tcp_admin.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/network/core/tcp_admin.h b/src/network/core/tcp_admin.h index 6d498ce5d..33ab7b049 100644 --- a/src/network/core/tcp_admin.h +++ b/src/network/core/tcp_admin.h @@ -30,6 +30,7 @@ enum PacketAdminType { ADMIN_PACKET_ADMIN_RCON, ///< The admin sends a remote console command. ADMIN_PACKET_ADMIN_GAMESCRIPT, ///< The admin sends a JSON string for the GameScript. ADMIN_PACKET_ADMIN_PING, ///< The admin sends a ping to the server, expecting a ping-reply (PONG) packet. + ADMIN_PACKET_ADMIN_EXTERNAL_CHAT, ///< The admin sends a chat message from external source. ADMIN_PACKET_SERVER_FULL = 100, ///< The server tells the admin it cannot accept the admin. ADMIN_PACKET_SERVER_BANNED, ///< The server tells the admin it is banned. @@ -164,6 +165,17 @@ protected: virtual NetworkRecvStatus Receive_ADMIN_CHAT(Packet *p); /** + * Send chat from the external source: + * string Name of the source this message came from. + * uint16 TextColour to use for the message. + * string Name of the user who sent the messsage. + * string Message. + * @param p The packet that was just received. + * @return The state the network should have. + */ + virtual NetworkRecvStatus Receive_ADMIN_EXTERNAL_CHAT(Packet *p); + + /** * Execute a command on the servers console: * string Command to be executed. * @param p The packet that was just received. |