summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPeter Powell <petpow@saberuk.com>2018-07-11 12:08:19 +0100
committerPeter Powell <petpow@saberuk.com>2018-07-11 12:10:18 +0100
commit11e67c494a9a1e7796c7b6ec0a60c88019181020 (patch)
treeda106909da46445eb628c831f6469e3268dda5b3 /src
parent76c7e9db436a575e5c92d22ee3acaf6613660bb8 (diff)
Fix replying with the source user in oper-restricted WHO lookups.
Diffstat (limited to 'src')
-rw-r--r--src/commands/cmd_who.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/commands/cmd_who.cpp b/src/commands/cmd_who.cpp
index 8438f8cdd..d92394c3b 100644
--- a/src/commands/cmd_who.cpp
+++ b/src/commands/cmd_who.cpp
@@ -340,15 +340,13 @@ CmdResult CommandWho::Handle (const std::vector<std::string>& parameters, User *
for (UserMembCIter i = cu->begin(); i != cu->end(); i++)
{
- /* None of this applies if we WHO ourselves */
- if (user != i->first)
{
/* opers only, please */
if (opt_viewopersonly && !IS_OPER(i->first))
continue;
/* If we're not inside the channel, hide +i users */
- if (i->first->IsModeSet('i') && !inside && !user->HasPrivPermission("users/auspex"))
+ if (!inside && user != i->first && i->first->IsModeSet('i') && !user->HasPrivPermission("users/auspex"))
continue;
}