summaryrefslogtreecommitdiff
path: root/src/mode.cpp
diff options
context:
space:
mode:
authorAttila Molnar <attilamolnar@hush.com>2016-08-30 16:05:01 +0200
committerAttila Molnar <attilamolnar@hush.com>2016-08-30 16:05:01 +0200
commitf0debf907a36846e3b48767e9797880135a4583b (patch)
treec2130bb47a303e4f253b8adb6dd15fa43f8e943d /src/mode.cpp
parentf899ea2786e2ccf1b5765efd68c99273c9c056a9 (diff)
Pass the ModeHandler to User::HasModePermission()
Mark the method as const
Diffstat (limited to 'src/mode.cpp')
-rw-r--r--src/mode.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mode.cpp b/src/mode.cpp
index beea6d3a0..b7a7b7d41 100644
--- a/src/mode.cpp
+++ b/src/mode.cpp
@@ -294,7 +294,7 @@ ModeAction ModeParser::TryMode(User* user, User* targetuser, Channel* chan, Mode
}
}
- if (adding && IS_LOCAL(user) && mh->NeedsOper() && !user->HasModePermission(modechar, type))
+ if ((adding) && (IS_LOCAL(user)) && (mh->NeedsOper()) && (!user->HasModePermission(mh)))
{
/* It's an oper only mode, and they don't have access to it. */
if (user->IsOper())