diff options
| author | 2016-08-30 16:05:01 +0200 | |
|---|---|---|
| committer | 2016-08-30 16:05:01 +0200 | |
| commit | f0debf907a36846e3b48767e9797880135a4583b (patch) | |
| tree | c2130bb47a303e4f253b8adb6dd15fa43f8e943d /src/modules/m_check.cpp | |
| parent | Add const versions of ModeHandler::IsPrefixMode(), IsListModeBase() and IsPar... (diff) | |
Pass the ModeHandler to User::HasModePermission()
Mark the method as const
Diffstat (limited to 'src/modules/m_check.cpp')
| -rw-r--r-- | src/modules/m_check.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/modules/m_check.cpp b/src/modules/m_check.cpp index 17eb9d9c5..ddac033c1 100644 --- a/src/modules/m_check.cpp +++ b/src/modules/m_check.cpp @@ -184,10 +184,10 @@ class CommandCheck : public Command for(char c='A'; c <= 'z'; c++) { ModeHandler* mh = ServerInstance->Modes->FindMode(c, MODETYPE_USER); - if (mh && mh->NeedsOper() && loctarg->HasModePermission(c, MODETYPE_USER)) + if (mh && mh->NeedsOper() && loctarg->HasModePermission(mh)) umodes.push_back(c); mh = ServerInstance->Modes->FindMode(c, MODETYPE_CHANNEL); - if (mh && mh->NeedsOper() && loctarg->HasModePermission(c, MODETYPE_CHANNEL)) + if (mh && mh->NeedsOper() && loctarg->HasModePermission(mh)) cmodes.push_back(c); } context.Write("modeperms", "user=" + umodes + " channel=" + cmodes); |
