diff options
author | Attila Molnar <attilamolnar@hush.com> | 2016-08-30 16:05:01 +0200 |
---|---|---|
committer | Attila Molnar <attilamolnar@hush.com> | 2016-08-30 16:05:01 +0200 |
commit | f0debf907a36846e3b48767e9797880135a4583b (patch) | |
tree | c2130bb47a303e4f253b8adb6dd15fa43f8e943d /src/mode.cpp | |
parent | f899ea2786e2ccf1b5765efd68c99273c9c056a9 (diff) |
Pass the ModeHandler to User::HasModePermission()
Mark the method as const
Diffstat (limited to 'src/mode.cpp')
-rw-r--r-- | src/mode.cpp | 2 |
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()) |