diff options
author | MadCamel <madcamel@gmail.com> | 2010-10-08 07:30:52 -0400 |
---|---|---|
committer | MadCamel <madcamel@gmail.com> | 2010-10-08 07:30:52 -0400 |
commit | 8040f42b2e2b2ee95ef49f49d7ccf7d4eeb39201 (patch) | |
tree | 58d12d7da9583fe75f6b1284f9881df7f28be58a /src/map/battle.c | |
parent | 2239ad20a1420686bd58349ae4e364ecbc30d871 (diff) | |
download | tmwa-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/battle.c')
-rw-r--r-- | src/map/battle.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/map/battle.c b/src/map/battle.c index ea284a5..9d868c7 100644 --- a/src/map/battle.c +++ b/src/map/battle.c @@ -5657,6 +5657,7 @@ int battle_config_read (const char *cfgName) battle_config.packet_spam_flood = 30; battle_config.packet_spam_kick = 1; + battle_config.mask_ip_gms = 1; } fp = fopen_ (cfgName, "r"); @@ -6107,7 +6108,9 @@ int battle_config_read (const char *cfgName) { "packet_spam_flood", &battle_config.packet_spam_flood}, { - "packet_spam_kick", &battle_config.packet_spam_kick} + "packet_spam_kick", &battle_config.packet_spam_kick}, + { + "mask_ip_gms", &battle_config.mask_ip_gms} }; if (line[0] == '/' && line[1] == '/') @@ -6264,6 +6267,11 @@ int battle_config_read (const char *cfgName) else if (battle_config.packet_spam_kick > 1) battle_config.packet_spam_kick = 1; + if (battle_config.mask_ip_gms < 0) + battle_config.mask_ip_gms = 0; + else if (battle_config.mask_ip_gms > 1) + battle_config.mask_ip_gms = 1; + // at least 1 client must be accepted if ((battle_config.packet_ver_flag & 63) == 0) // added by [Yor] battle_config.packet_ver_flag = 63; // accept all clients |