summaryrefslogtreecommitdiff
path: root/src/commands.cpp
diff options
context:
space:
mode:
authorom <om@e03df62e-2008-0410-955e-edbf42e46eb7>2006-03-30 21:07:24 +0000
committerom <om@e03df62e-2008-0410-955e-edbf42e46eb7>2006-03-30 21:07:24 +0000
commitc73bb5d2ca948e418fc531840b382e378c9d47f6 (patch)
treed724910e7cae2cc0573867ecb2dcdf05ebb5ba80 /src/commands.cpp
parenta46930efdc701520a187263e0f08195dcb344ef2 (diff)
Make /whois code a little prettier, make /whowas show real host as well as displayed host and show real server/fake server correctly (real to opers). Remove some unecessary casts
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@3788 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/commands.cpp')
-rw-r--r--src/commands.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/commands.cpp b/src/commands.cpp
index f0f5ddf30..aea43482f 100644
--- a/src/commands.cpp
+++ b/src/commands.cpp
@@ -119,7 +119,7 @@ void do_whois(userrec* user, userrec* dest,unsigned long signon, unsigned long i
WriteServ(user->fd,"311 %s %s %s %s * :%s",user->nick, dest->nick, dest->ident, dest->dhost, dest->fullname);
if ((user == dest) || (*user->oper))
{
- WriteServ(user->fd,"378 %s %s :is connecting from *@%s %s",user->nick, dest->nick, dest->host, (char*)inet_ntoa(dest->ip4));
+ WriteServ(user->fd,"378 %s %s :is connecting from *@%s %s",user->nick, dest->nick, dest->host, inet_ntoa(dest->ip4));
}
std::string cl = chlist(dest,user);
if (cl.length())
@@ -133,9 +133,9 @@ 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());
}
}
- if (*Config->HideWhoisServer)
+ if (*Config->HideWhoisServer && !(*user->oper))
{
- 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);
+ WriteServ(user->fd,"312 %s %s %s :%s",user->nick, dest->nick, Config->HideWhoisServer, Config->Network);
}
else
{