]> git.netwichtig.de Git - user/henk/code/inspircd.git/commitdiff
Apply <options:hidewhois> in /who results (bug #239); someone should clean up /who...
authorspecial <special@e03df62e-2008-0410-955e-edbf42e46eb7>
Fri, 9 Mar 2007 03:23:32 +0000 (03:23 +0000)
committerspecial <special@e03df62e-2008-0410-955e-edbf42e46eb7>
Fri, 9 Mar 2007 03:23:32 +0000 (03:23 +0000)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6640 e03df62e-2008-0410-955e-edbf42e46eb7

src/cmd_who.cpp

index 11b001eabd58c329d7e753e0aaef14482880c2f3..e6d6287ffba1843789862c9522d2449a884e9398 100644 (file)
@@ -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) + " " + 
                        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)
 
                        /* 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) + " " + 
                                        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));
 
 
                                        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) + " " + 
                                        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));
 
        
                                        ch = ServerInstance->FindChan(getlastchanname(i->second));