summaryrefslogtreecommitdiff
path: root/src/net
diff options
context:
space:
mode:
Diffstat (limited to 'src/net')
-rw-r--r--src/net/tmwa/adminhandler.cpp9
-rw-r--r--src/net/tmwa/network.cpp4
-rw-r--r--src/net/tmwa/protocol.h1
3 files changed, 12 insertions, 2 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;
}
}
diff --git a/src/net/tmwa/network.cpp b/src/net/tmwa/network.cpp
index aff19b11..4d2073a0 100644
--- a/src/net/tmwa/network.cpp
+++ b/src/net/tmwa/network.cpp
@@ -77,8 +77,8 @@ short packet_lengths[] = {
8, 14, 10, 35, 6, 8, 4, 11, 54, 53, 60, 2, -1, 47, 33, 6,
30, 8, 34, 14, 2, 6, 26, 2, 28, 81, 6, 10, 26, 2, -1, -1,
-1, -1, 20, 10, 32, 9, 34, 14, 2, 6, 48, 56, -1, 4, 5, 10,
-// #0x2000
- 26, 0, 0, 0, 18, 0, 0, 0, 0, 0, 0, 19, 0, 0, 0, 0,
+// #0x0200
+ 26, 0, 0, 0, 18, 0, 0, 0, 0, 0, 0, 19, 10, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
};
diff --git a/src/net/tmwa/protocol.h b/src/net/tmwa/protocol.h
index 21d562bc..0a768d5d 100644
--- a/src/net/tmwa/protocol.h
+++ b/src/net/tmwa/protocol.h
@@ -181,6 +181,7 @@ static const int STORAGE_OFFSET = 1;
#define SMSG_PLAYER_STORAGE_CLOSE 0x00f8 /**< Storage access closed */
#define SMSG_ADMIN_KICK_ACK 0x00cd
+#define SMSG_ADMIN_IP 0x020c
#define SMSG_GUILD_CREATE_RESPONSE 0x0167
#define SMSG_GUILD_POSITION_INFO 0x016c