From c69866123ba83f9dd4619c81eca312dda0559393 Mon Sep 17 00:00:00 2001 From: Stefan Dombrowski Date: Mon, 11 Oct 2010 22:05:02 +0200 Subject: Implementing show IP for game masters As an upcoming feature the TMW-Athena server sends IP addresses or IP hashes to game masters. The current client freezes if it receives such a packet, therefor the game masters need to use a new client before the server can use it. Normal players are not affected, because they do not get this packet. Showing the IP is optional and can be enable with the chat command "/showip 1". The IP is then shown behind the players name. Reviewed-by: Bertram --- src/player.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'src/player.h') diff --git a/src/player.h b/src/player.h index e75870a0..4ac9d0eb 100644 --- a/src/player.h +++ b/src/player.h @@ -138,6 +138,18 @@ class Player : public Being */ virtual void optionChanged(const std::string &value); + /* + * Sets the IP or an IP hash. + * The TMW-Athena server sends this information only to GMs. + */ + void setIp(int ip) { mIp = ip; } + + /** + * Returns the player's IP or an IP hash. + * Value is 0 if not set by the server. + */ + int getIp() const { return mIp; } + protected: /** * Gets the way the monster blocks pathfinding for other objects. @@ -156,6 +168,8 @@ class Player : public Being Party *mParty; bool mIsGM; + + int mIp; }; #endif -- cgit v1.2.3-70-g09d2