diff options
author | special <special@e03df62e-2008-0410-955e-edbf42e46eb7> | 2007-03-09 03:23:32 +0000 |
---|---|---|
committer | special <special@e03df62e-2008-0410-955e-edbf42e46eb7> | 2007-03-09 03:23:32 +0000 |
commit | 4903848416ecc4c50f520b4a0f0a02dfc8bfad89 (patch) | |
tree | 8da69b0ce68f7341421bdc675afd6b245aecfbcb | |
parent | d5e5e016f9e84f0c5ab1af3e94dd0280adecf088 (diff) |
Apply <options:hidewhois> in /who results (bug #239); someone should clean up /who soon, perhaps i'll do it
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6640 e03df62e-2008-0410-955e-edbf42e46eb7
-rw-r--r-- | src/cmd_who.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/cmd_who.cpp b/src/cmd_who.cpp index 11b001eab..e6d6287ff 100644 --- a/src/cmd_who.cpp +++ b/src/cmd_who.cpp @@ -169,7 +169,8 @@ CmdResult cmd_who::Handle (const char** parameters, int pcnt, userrec *user) std::string wholine = initial; wholine = wholine + ch->name + " " + i->second->ident + " " + (opt_showrealhost ? i->second->host : i->second->dhost) + " " + - i->second->server + " " + i->second->nick + " "; + ((*ServerInstance->Config->HideWhoisServer && !*user->oper) ? ServerInstance->Config->HideWhoisServer : i->second->server) + + " " + i->second->nick + " "; /* away? */ if (*(i->second)->awaymsg) @@ -207,7 +208,8 @@ CmdResult cmd_who::Handle (const char** parameters, int pcnt, userrec *user) std::string wholine = initial; wholine = wholine + getlastchanname(oper) + " " + oper->ident + " " + (opt_showrealhost ? oper->host : oper->dhost) + " " + - oper->server + " " + oper->nick + " "; + ((*ServerInstance->Config->HideWhoisServer && !*user->oper) ? ServerInstance->Config->HideWhoisServer : oper->server) + + " " + oper->nick + " "; ch = ServerInstance->FindChan(getlastchanname(oper)); @@ -241,7 +243,8 @@ CmdResult cmd_who::Handle (const char** parameters, int pcnt, userrec *user) std::string wholine = initial; wholine = wholine + getlastchanname(i->second) + " " + i->second->ident + " " + (opt_showrealhost ? i->second->host : i->second->dhost) + " " + - i->second->server + " " + i->second->nick + " "; + ((*ServerInstance->Config->HideWhoisServer && !*user->oper) ? ServerInstance->Config->HideWhoisServer : i->second->server) + + " " + i->second->nick + " "; ch = ServerInstance->FindChan(getlastchanname(i->second)); |