diff options
Diffstat (limited to 'src/modules/m_chanprotect.cpp')
-rw-r--r-- | src/modules/m_chanprotect.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/modules/m_chanprotect.cpp b/src/modules/m_chanprotect.cpp index 54691f05d..84aada158 100644 --- a/src/modules/m_chanprotect.cpp +++ b/src/modules/m_chanprotect.cpp @@ -309,7 +309,11 @@ class ModuleChanProtect : public Module cf = new ChanFounder(ServerInstance,QAPrefixes,DeprivSelf,DeprivOthers); if (!ServerInstance->AddMode(cp) || !ServerInstance->AddMode(cf)) + { + delete cp; + delete cf; throw ModuleException("Could not add new modes!"); + } Implementation eventlist[] = { I_OnUserKick, I_OnUserPart, I_OnRehash, I_OnUserPreJoin, I_OnPostJoin, I_OnAccessCheck, I_OnSyncChannel }; ServerInstance->Modules->Attach(eventlist, this, 7); |