summaryrefslogtreecommitdiff
path: root/src/map/clif.c
diff options
context:
space:
mode:
authorMadCamel <madcamel@gmail.com>2010-10-08 07:30:52 -0400
committerMadCamel <madcamel@gmail.com>2010-10-08 07:30:52 -0400
commit8040f42b2e2b2ee95ef49f49d7ccf7d4eeb39201 (patch)
tree58d12d7da9583fe75f6b1284f9881df7f28be58a /src/map/clif.c
parent2239ad20a1420686bd58349ae4e364ecbc30d871 (diff)
downloadtmwa-8040f42b2e2b2ee95ef49f49d7ccf7d4eeb39201.tar.gz
tmwa-8040f42b2e2b2ee95ef49f49d7ccf7d4eeb39201.tar.bz2
tmwa-8040f42b2e2b2ee95ef49f49d7ccf7d4eeb39201.tar.xz
tmwa-8040f42b2e2b2ee95ef49f49d7ccf7d4eeb39201.zip
Added IP address reply packet 0x20C (len 10)
This is sent along with char name replies to GMs able to recieve hack notices. Unfortunately,it locks up clients that do not support this packet. Must coordinate to get this added to TMW 0.5 release and mana. Until then, code is commented out in clif.c(grep for MD5_ip) Packet structure: 0x20C (len 2) AccountID of character name was requested for (len 4) IP address of requested char in network byte order (len 4) Config option in battle_athena.conf: gm_mask_ips (boolean) - When set to 1(default) GMs will only see a hashed/masked IP address.
Diffstat (limited to 'src/map/clif.c')
-rw-r--r--src/map/clif.c19
1 files changed, 18 insertions, 1 deletions
diff --git a/src/map/clif.c b/src/map/clif.c
index 3cd01ee..1a1acf9 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -23,6 +23,7 @@
#include "malloc.h"
#include "version.h"
#include "nullpo.h"
+#include "md5calc.h"
#include "atcommand.h"
#include "battle.h"
@@ -93,7 +94,7 @@ static const int packet_len_table[0x220] = {
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,
//#0x200
- 26, -1, 26, 10, 18, 26, 11, 34, 14, 36, 10, 19, 0, -1, 24, 0,
+ 26, -1, 26, 10, 18, 26, 11, 34, 14, 36, 10, 19, 10, -1, 24, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
};
@@ -7107,6 +7108,22 @@ void clif_parse_GetCharNameRequest (int fd, struct map_session_data *sd)
}
+#if 0
+ if (pc_isGM(sd) > battle_config.hack_info_GM_level)
+ {
+ in_addr_t ip = ssd->ip;
+ WFIFOW (fd, 0) = 0x20C;
+
+ // Mask the IP using the char-server password
+ if (battle_config.mask_ip_gms)
+ ip = MD5_ip(chrif_getpasswd (), ssd->ip);
+
+ WFIFOL (fd, 2) = account_id;
+ WFIFOL (fd, 6) = ip;
+ WFIFOSET (fd, packet_len_table[0x20C]);
+ }
+#endif
+
}
break;
case BL_NPC: