summaryrefslogtreecommitdiff
path: root/src/network/core/tcp_admin.h
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2010-10-17 17:36:59 +0000
committerrubidium <rubidium@openttd.org>2010-10-17 17:36:59 +0000
commit901c4a56bd29b687bee0cd7ffa49e8c9a08b9bf9 (patch)
treeff6991e521b636959751be8fefc7db61d92f7b15 /src/network/core/tcp_admin.h
parentb4ce7fad7f79f100ef1aae22f9f79aa0b6a7d743 (diff)
downloadopenttd-901c4a56bd29b687bee0cd7ffa49e8c9a08b9bf9.tar.xz
(svn r20968) -Add: date notification of remote admins (dihedral)
Diffstat (limited to 'src/network/core/tcp_admin.h')
-rw-r--r--src/network/core/tcp_admin.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/network/core/tcp_admin.h b/src/network/core/tcp_admin.h
index 3ed444257..f93b5c388 100644
--- a/src/network/core/tcp_admin.h
+++ b/src/network/core/tcp_admin.h
@@ -39,6 +39,8 @@ enum PacketAdminType {
ADMIN_PACKET_SERVER_NEWGAME, ///< The server tells the admin its going to start a new game.
ADMIN_PACKET_SERVER_SHUTDOWN, ///< The server tells the admin its shutting down.
+ ADMIN_PACKET_SERVER_DATE, ///< The server tells the admin what the current game date is.
+
INVALID_ADMIN_PACKET = 0xFF, ///< An invalid marker for admin packets.
};
@@ -51,6 +53,7 @@ enum AdminStatus {
/** Update types an admin can register a frequency for */
enum AdminUpdateType {
+ ADMIN_UPDATE_DATE, ///< Updates about the date of the game.
ADMIN_UPDATE_END ///< Must ALWAYS be on the end of this list!! (period)
};
@@ -152,6 +155,12 @@ protected:
*/
DECLARE_ADMIN_RECEIVE_COMMAND(ADMIN_PACKET_SERVER_SHUTDOWN);
+ /**
+ * Send the current date of the game:
+ * uint32 Current game date.
+ */
+ DECLARE_ADMIN_RECEIVE_COMMAND(ADMIN_PACKET_SERVER_DATE);
+
NetworkRecvStatus HandlePacket(Packet *p);
public:
NetworkRecvStatus CloseConnection(bool error = true);