From 1ff88eedb68a95ac7ff501b512f964bbc0843165 Mon Sep 17 00:00:00 2001 From: driAn Date: Sat, 3 May 2008 20:27:14 +0000 Subject: [PATCH] censored WHOIS for non-admins git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@1847 e016b1c5-ed68-44aa-a2f7-31cac88cffde --- source/src/clients2c.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/source/src/clients2c.cpp b/source/src/clients2c.cpp index e48cd921..e5e604e7 100644 --- a/source/src/clients2c.cpp +++ b/source/src/clients2c.cpp @@ -629,7 +629,8 @@ void parsemessages(int cn, playerent *d, ucharbuf &p) int cn = getint(p); playerent *pl = cn == getclientnum() ? player1 : getclient(cn); int ip = getint(p); - conoutf("WHOIS client %d:\n\f5name\t%s\n\f5IP\t%d.%d.%d.%d", cn, pl ? colorname(pl) : "", ip&0xFF, ip>>8&0xFF, ip>>16&0xFF, ip>>24&0xFF); + if((ip>>16&0xFF) > 0 && (ip>>24&0xFF) > 0) conoutf("WHOIS client %d:\n\f5name\t%s\n\f5IP\t%d.%d.%d.%d", cn, pl ? colorname(pl) : "", ip&0xFF, ip>>8&0xFF, ip>>16&0xFF, ip>>24&0xFF); // full IP + else conoutf("WHOIS client %d:\n\f5name\t%s\n\f5IP\t%d.%d.x.x", cn, pl ? colorname(pl) : "", ip&0xFF, ip>>8&0xFF); // censored IP break; }