]> git.netwichtig.de Git - user/henk/code/inspircd.git/commitdiff
Fix /who to hide users marked invisibile in some way by a module
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>
Fri, 4 May 2007 14:52:31 +0000 (14:52 +0000)
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>
Fri, 4 May 2007 14:52:31 +0000 (14:52 +0000)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6870 e03df62e-2008-0410-955e-edbf42e46eb7

src/cmd_who.cpp

index c6a6a33c7799a8338fae260c483e6b9869a9834f..dfd0a445a403aabe079fef9607acebb3e1e14d25 100644 (file)
@@ -96,6 +96,10 @@ void cmd_who::SendWhoLine(userrec* user, const std::string &initial, chanrec* ch
        std::string lcn = getlastchanname(u);
        chanrec* chlast = ServerInstance->FindChan(lcn);
 
+       /* Not visible to this user */
+       if (u->Visibility && !u->Visibility->VisibleTo(user))
+               return;
+
        std::string wholine =   initial + (ch ? ch->name : lcn) + " " + u->ident + " " + (opt_showrealhost ? u->host : u->dhost) + " " +
                                ((*ServerInstance->Config->HideWhoisServer && !*user->oper) ? ServerInstance->Config->HideWhoisServer : u->server) +
                                " " + u->nick + " ";