diff options
Diffstat (limited to 'src/modules/m_censor.cpp')
-rw-r--r-- | src/modules/m_censor.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/modules/m_censor.cpp b/src/modules/m_censor.cpp index e29b10194..426d90cc9 100644 --- a/src/modules/m_censor.cpp +++ b/src/modules/m_censor.cpp @@ -98,7 +98,11 @@ class ModuleCensor : public Module cu = new CensorUser(ServerInstance); cc = new CensorChannel(ServerInstance); if (!ServerInstance->AddMode(cu) || !ServerInstance->AddMode(cc)) + { + delete cu; + delete cc; throw ModuleException("Could not add new modes!"); + } Implementation eventlist[] = { I_OnRehash, I_OnUserPreMessage, I_OnUserPreNotice }; ServerInstance->Modules->Attach(eventlist, this, 3); } |