From b328aad53b044bd9cf9720dfed216b0ee61c8e31 Mon Sep 17 00:00:00 2001 From: brain Date: Wed, 9 May 2007 21:12:35 +0000 Subject: Fix slightly broken oper checks on +i git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6927 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/cmd_who.cpp | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'src') 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); } } } -- cgit v1.2.3