aboutsummaryrefslogtreecommitdiff
path: root/src/users.cpp
diff options
context:
space:
mode:
authorGravatar Sadie Powell2023-01-02 19:48:14 +0000
committerGravatar Sadie Powell2023-01-02 19:48:14 +0000
commit37ce48e61ab8f0abb8434cd3a27844f6215188e1 (patch)
treeb7835cf676310624a0053bb7e6749d1074f7b53d /src/users.cpp
parentAdd a method for unescaping tags. (diff)
Add some useful aliases to OperType.
Diffstat (limited to 'src/users.cpp')
-rw-r--r--src/users.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/users.cpp b/src/users.cpp
index 2036c559d..5cb862e8c 100644
--- a/src/users.cpp
+++ b/src/users.cpp
@@ -1331,13 +1331,13 @@ bool OperType::CanUseCommand(const std::string& cmd) const
return commands.Contains(cmd);
}
-bool OperType::CanUseMode(const ModeHandler* mh) const
+bool OperType::CanUseMode(ModeType mt, unsigned char chr) const
{
- const size_t index = ModeParser::GetModeIndex(mh->GetModeChar());
+ const size_t index = ModeParser::GetModeIndex(chr);
if (index == ModeParser::MODEID_MAX)
return false;
- return (mh->GetModeType() == MODETYPE_USER ? usermodes : chanmodes)[index];
+ return (mt == MODETYPE_USER ? usermodes : chanmodes)[index];
}
bool OperType::CanUseSnomask(unsigned char chr) const