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");
}
}
/* oper? */
- if (u->oper)
+ if (*u->oper)
{
wholine.append("*");
}