]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/cmd_who.cpp
Fix for bug typo, dont let it creep into the release!
[user/henk/code/inspircd.git] / src / cmd_who.cpp
index c4c37e52876d260c0ac32c3af203fbdf8b85695e..dfd0a445a403aabe079fef9607acebb3e1e14d25 100644 (file)
@@ -96,12 +96,16 @@ 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 + " ";
 
        /* away? */
-       if (u->awaymsg)
+       if (*u->awaymsg)
        {
                wholine.append("G");
        }
@@ -111,7 +115,7 @@ void cmd_who::SendWhoLine(userrec* user, const std::string &initial, chanrec* ch
        }
 
        /* oper? */
-       if (u->oper)
+       if (*u->oper)
        {
                wholine.append("*");
        }