From ade1500382366b0cf24147370aea0a3e5bbe50bf Mon Sep 17 00:00:00 2001 From: Attila Molnar Date: Mon, 6 Jan 2014 13:37:06 +0100 Subject: Automatically register and unregister mode watchers --- src/mode.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/mode.cpp') 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() -- cgit v1.2.3