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/localplayer.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/localplayer.h') diff --git a/src/localplayer.h b/src/localplayer.h index 03fec1f8..7706caeb 100644 --- a/src/localplayer.h +++ b/src/localplayer.h @@ -354,6 +354,12 @@ class LocalPlayer : public Player std::pair getExperience(int skill); + void setShowIp(bool show) + { mShowIp = show; } + + bool getShowIp() const + { return mShowIp; } + /** Tells that the path has been set by mouse. */ void pathSetByMouse() { mPathSetByMouse = true; } @@ -476,6 +482,8 @@ class LocalPlayer : public Player int mAfkTime; bool mAwayMode; + + bool mShowIp; }; extern LocalPlayer *player_node; -- cgit v1.2.3-70-g09d2