aboutsummaryrefslogtreecommitdiffstats
path: root/src/mode.cpp
diff options
context:
space:
mode:
authorGravatar Attila Molnar2014-01-06 13:37:06 +0100
committerGravatar Attila Molnar2014-01-06 13:37:06 +0100
commitade1500382366b0cf24147370aea0a3e5bbe50bf (patch)
tree699fe35aaaa3645a8ac0219bce3a44dba1b50ba6 /src/mode.cpp
parentUnset all extensions and the topic when lowering TS on a channel (diff)
downloadinspircd++-ade1500382366b0cf24147370aea0a3e5bbe50bf.tar.gz
inspircd++-ade1500382366b0cf24147370aea0a3e5bbe50bf.tar.bz2
inspircd++-ade1500382366b0cf24147370aea0a3e5bbe50bf.zip
Automatically register and unregister mode watchers
Diffstat (limited to 'src/mode.cpp')
-rw-r--r--src/mode.cpp2
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()