X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fcommands%2Fcmd_who.cpp;h=5e0e55b66865abfb0a9c31efa5164e18e316c129;hb=8710724b5518ae9858309e548514f76e620a8459;hp=a78f03793e167c0a56667cb2361f0340ab35840b;hpb=b954283ccc4253a6881513bbe7f743c39886d3b7;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/commands/cmd_who.cpp b/src/commands/cmd_who.cpp index a78f03793..5e0e55b66 100644 --- a/src/commands/cmd_who.cpp +++ b/src/commands/cmd_who.cpp @@ -41,6 +41,7 @@ class CommandWho : public Command bool opt_time; ChanModeReference secretmode; ChanModeReference privatemode; + UserModeReference invisiblemode; Channel* get_first_visible_channel(User *u) { @@ -61,6 +62,7 @@ class CommandWho : public Command : Command(parent, "WHO", 1) , secretmode(parent, "secret") , privatemode(parent, "private") + , invisiblemode(parent, "invisible") { syntax = "|||||0 [ohurmMiaplf]"; } @@ -227,7 +229,7 @@ void CommandWho::SendWhoLine(User* user, const std::vector& parms, wholine.append(" :0 " + u->fullname); - FOREACH_MOD(I_OnSendWhoLine, OnSendWhoLine(user, parms, u, wholine)); + FOREACH_MOD(OnSendWhoLine, (user, parms, u, wholine)); if (!wholine.empty()) whoresults.push_back(wholine); @@ -336,7 +338,7 @@ CmdResult CommandWho::Handle (const std::vector& parameters, User * continue; /* If we're not inside the channel, hide +i users */ - if (i->first->IsModeSet('i') && !inside && !user->HasPrivPermission("users/auspex")) + if (i->first->IsModeSet(invisiblemode) && !inside && !user->HasPrivPermission("users/auspex")) continue; } @@ -358,7 +360,7 @@ CmdResult CommandWho::Handle (const std::vector& parameters, User * { if (!user->SharesChannelWith(oper)) { - if (usingwildcards && (!oper->IsModeSet('i')) && (!user->HasPrivPermission("users/auspex"))) + if (usingwildcards && (!oper->IsModeSet(invisiblemode)) && (!user->HasPrivPermission("users/auspex"))) continue; } @@ -374,7 +376,7 @@ CmdResult CommandWho::Handle (const std::vector& parameters, User * { if (!user->SharesChannelWith(i->second)) { - if (usingwildcards && (i->second->IsModeSet('i')) && (!user->HasPrivPermission("users/auspex"))) + if (usingwildcards && (i->second->IsModeSet(invisiblemode)) && (!user->HasPrivPermission("users/auspex"))) continue; }