diff options
author | Sadie Powell <sadie@witchery.services> | 2020-01-05 15:22:40 +0000 |
---|---|---|
committer | Sadie Powell <sadie@witchery.services> | 2020-01-05 15:22:40 +0000 |
commit | 473df5542f96cf572a918979db843a75a2c94798 (patch) | |
tree | 1a4e635d9096eaed97290c50bc729139680eaa69 /include/mode.h | |
parent | 007e0b46a82f0aa4ebe47472d0fed63d845107b7 (diff) |
Add an oper only parameter to Simple{Channel,User}ModeHandler.
Diffstat (limited to 'include/mode.h')
-rw-r--r-- | include/mode.h | 16 |
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; }; |