diff options
author | Attila Molnar <attilamolnar@hush.com> | 2014-01-06 13:37:06 +0100 |
---|---|---|
committer | Attila Molnar <attilamolnar@hush.com> | 2014-01-06 13:37:06 +0100 |
commit | ade1500382366b0cf24147370aea0a3e5bbe50bf (patch) | |
tree | 699fe35aaaa3645a8ac0219bce3a44dba1b50ba6 /src/mode.cpp | |
parent | 5a366d8945e1312190d0012eb36d2facaa908650 (diff) |
Automatically register and unregister mode watchers
Diffstat (limited to 'src/mode.cpp')
-rw-r--r-- | src/mode.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/mode.cpp b/src/mode.cpp index 162793369..e0381b683 100644 --- a/src/mode.cpp +++ b/src/mode.cpp @@ -145,10 +145,12 @@ bool ParamChannelModeHandler::ParamValidate(std::string& parameter) ModeWatcher::ModeWatcher(Module* Creator, const std::string& modename, ModeType type) : mode(modename), m_type(type), creator(Creator) { + ServerInstance->Modes->AddModeWatcher(this); } ModeWatcher::~ModeWatcher() { + ServerInstance->Modes->DelModeWatcher(this); } ModeType ModeWatcher::GetModeType() |