summaryrefslogtreecommitdiff
path: root/src/commands.cpp
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-02-03 10:03:01 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-02-03 10:03:01 +0000
commit7cbc465e2a153f65c242aebc1b2a88d3c667d551 (patch)
treea29f2b0ca89078d6532eb1cd79a8285b85b4dc8a /src/commands.cpp
parent00620508331f1b67ae3a6b36f87ed106685c1e62 (diff)
Added ircu-like hidewhois feature that allows hiding of server name in whois with arbitary string like '*.network.net'
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@3034 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/commands.cpp')
-rw-r--r--src/commands.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/commands.cpp b/src/commands.cpp
index 4d09db9fe..4b376bbde 100644
--- a/src/commands.cpp
+++ b/src/commands.cpp
@@ -133,7 +133,14 @@ void do_whois(userrec* user, userrec* dest,unsigned long signon, unsigned long i
WriteServ(user->fd,"319 %s %s :%s",user->nick, dest->nick, cl.c_str());
}
}
- WriteServ(user->fd,"312 %s %s %s :%s",user->nick, dest->nick, dest->server, GetServerDescription(dest->server).c_str());
+ if (*Config->HideWhoisServer)
+ {
+ WriteServ(user->fd,"312 %s %s %s :%s",user->nick, dest->nick, *user->oper ? dest->server : Config->HideWhoisServer, *user->oper ? GetServerDescription(dest->server).c_str() : Config->Network);
+ }
+ else
+ {
+ WriteServ(user->fd,"312 %s %s %s :%s",user->nick, dest->nick, dest->server, GetServerDescription(dest->server).c_str());
+ }
if (*dest->awaymsg)
{
WriteServ(user->fd,"301 %s %s :%s",user->nick, dest->nick, dest->awaymsg);