diff options
author | Stefan Dombrowski <stefan@uni-bonn.de> | 2010-10-11 22:05:02 +0200 |
---|---|---|
committer | Stefan Dombrowski <stefan@uni-bonn.de> | 2010-10-11 22:05:02 +0200 |
commit | c69866123ba83f9dd4619c81eca312dda0559393 (patch) | |
tree | ff5096e3df390609744ddf1935df1053352f3f80 /src/net/tmwa/adminhandler.cpp | |
parent | 2fb1520540598a5e6201f722979dada6b3283d0d (diff) | |
download | mana-c69866123ba83f9dd4619c81eca312dda0559393.tar.gz mana-c69866123ba83f9dd4619c81eca312dda0559393.tar.bz2 mana-c69866123ba83f9dd4619c81eca312dda0559393.tar.xz mana-c69866123ba83f9dd4619c81eca312dda0559393.zip |
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
Diffstat (limited to 'src/net/tmwa/adminhandler.cpp')
-rw-r--r-- | src/net/tmwa/adminhandler.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/net/tmwa/adminhandler.cpp b/src/net/tmwa/adminhandler.cpp index e56d5a44..c75ec217 100644 --- a/src/net/tmwa/adminhandler.cpp +++ b/src/net/tmwa/adminhandler.cpp @@ -24,6 +24,7 @@ #include "being.h" #include "beingmanager.h" #include "game.h" +#include "player.h" #include "playerrelations.h" #include "gui/widgets/chattab.h" @@ -46,6 +47,7 @@ AdminHandler::AdminHandler() { static const Uint16 _messages[] = { SMSG_ADMIN_KICK_ACK, + SMSG_ADMIN_IP, 0 }; handledMessages = _messages; @@ -64,6 +66,13 @@ void AdminHandler::handleMessage(Net::MessageIn &msg) else localChatTab->chatLog(_("Kick succeeded!"), BY_SERVER); break; + case SMSG_ADMIN_IP: + id = msg.readInt32(); + int ip = msg.readInt32(); + Player *player = (Player *)beingManager->findBeing(id); + player->setIp(ip); + player->updateName(); + break; } } |