summaryrefslogtreecommitdiff
path: root/include/mode.h
diff options
context:
space:
mode:
authorSadie Powell <sadie@witchery.services>2020-01-05 15:22:40 +0000
committerSadie Powell <sadie@witchery.services>2020-01-05 15:22:40 +0000
commit473df5542f96cf572a918979db843a75a2c94798 (patch)
tree1a4e635d9096eaed97290c50bc729139680eaa69 /include/mode.h
parent007e0b46a82f0aa4ebe47472d0fed63d845107b7 (diff)
Add an oper only parameter to Simple{Channel,User}ModeHandler.
Diffstat (limited to 'include/mode.h')
-rw-r--r--include/mode.h16
1 files changed, 12 insertions, 4 deletions
diff --git a/include/mode.h b/include/mode.h
index 7dc7feaec..7ef4548af 100644
--- a/include/mode.h
+++ b/include/mode.h
@@ -451,8 +451,12 @@ class CoreExport PrefixMode : public ModeHandler
class CoreExport SimpleUserModeHandler : public ModeHandler
{
public:
- SimpleUserModeHandler(Module* Creator, const std::string& Name, char modeletter)
- : ModeHandler(Creator, Name, modeletter, PARAM_NONE, MODETYPE_USER) {}
+ SimpleUserModeHandler(Module* Creator, const std::string& Name, char modeletter, bool operonly = false)
+ : ModeHandler(Creator, Name, modeletter, PARAM_NONE, MODETYPE_USER)
+ {
+ oper = operonly;
+ }
+
ModeAction OnModeChange(User* source, User* dest, Channel* channel, std::string& parameter, bool adding) CXX11_OVERRIDE;
};
@@ -464,8 +468,12 @@ class CoreExport SimpleUserModeHandler : public ModeHandler
class CoreExport SimpleChannelModeHandler : public ModeHandler
{
public:
- SimpleChannelModeHandler(Module* Creator, const std::string& Name, char modeletter)
- : ModeHandler(Creator, Name, modeletter, PARAM_NONE, MODETYPE_CHANNEL) {}
+ SimpleChannelModeHandler(Module* Creator, const std::string& Name, char modeletter, bool operonly = false)
+ : ModeHandler(Creator, Name, modeletter, PARAM_NONE, MODETYPE_CHANNEL)
+ {
+ oper = operonly;
+ }
+
ModeAction OnModeChange(User* source, User* dest, Channel* channel, std::string& parameter, bool adding) CXX11_OVERRIDE;
};