diff options
Diffstat (limited to 'include')
-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; }; |