diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2007-05-09 21:12:35 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2007-05-09 21:12:35 +0000 |
commit | b328aad53b044bd9cf9720dfed216b0ee61c8e31 (patch) | |
tree | c11b1e52a0610a56ae72dc8f2bb381f4bb6380d4 /src | |
parent | 711b65bb2a2470b1b3b8fee9bf8dd45b56361a1a (diff) |
Fix slightly broken oper checks on +i
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6927 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src')
-rw-r--r-- | src/cmd_who.cpp | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/src/cmd_who.cpp b/src/cmd_who.cpp index 39169b4ac..dad3b90b8 100644 --- a/src/cmd_who.cpp +++ b/src/cmd_who.cpp @@ -246,7 +246,7 @@ CmdResult cmd_who::Handle (const char** parameters, int pcnt, userrec *user) for (CUList::iterator i = cu->begin(); i != cu->end(); i++) { /* opers only, please */ - if (opt_viewopersonly && !*(i->second)->oper) + if (opt_viewopersonly && !IS_OPER(i->second)) continue; /* If we're not inside the channel, hide +i users */ @@ -270,8 +270,10 @@ CmdResult cmd_who::Handle (const char** parameters, int pcnt, userrec *user) if (whomatch(oper, matchtext)) { - if (!oper->IsModeSet('i')) - SendWhoLine(user, initial, NULL, oper, whoresults); + if ((!oper->IsModeSet('i')) && (!IS_OPER(user))) + continue; + + SendWhoLine(user, initial, NULL, oper, whoresults); } } } @@ -281,8 +283,10 @@ CmdResult cmd_who::Handle (const char** parameters, int pcnt, userrec *user) { if (whomatch(i->second, matchtext)) { - if (!i->second->IsModeSet('i')) - SendWhoLine(user, initial, NULL, i->second, whoresults); + if ((i->second->IsModeSet('i')) && (!IS_OPER(user))) + continue; + + SendWhoLine(user, initial, NULL, i->second, whoresults); } } } |