From 8040f42b2e2b2ee95ef49f49d7ccf7d4eeb39201 Mon Sep 17 00:00:00 2001 From: MadCamel Date: Fri, 8 Oct 2010 07:30:52 -0400 Subject: 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. --- src/map/clif.c | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) (limited to 'src/map/clif.c') 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: -- cgit v1.2.3-60-g2f50