X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_banexception.cpp;h=1811f743de59e5dd7fc64124b1d66ba5ccb9cb32;hb=692865acd58c9a475db1fdf4d419188325cd2182;hp=bf208518238b6c940419b1d3a2df8357e07f0568;hpb=46a39046196f55b52336e19662bb7bac85b731ac;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_banexception.cpp b/src/modules/m_banexception.cpp index bf2085182..1811f743d 100644 --- a/src/modules/m_banexception.cpp +++ b/src/modules/m_banexception.cpp @@ -52,13 +52,15 @@ class ModuleBanException : public Module public: ModuleBanException() : be(this) { - if (!ServerInstance->Modes->AddMode(&be)) - throw ModuleException("Could not add new modes!"); + } + + void init() + { + ServerInstance->Modules->AddService(be); be.DoImplements(this); Implementation list[] = { I_OnRehash, I_On005Numeric, I_OnExtBanCheck, I_OnCheckChannelBan }; - ServerInstance->Modules->Attach(list, this, 4); - + ServerInstance->Modules->Attach(list, this, sizeof(list)/sizeof(Implementation)); } void On005Numeric(std::string &output) @@ -115,11 +117,6 @@ public: return MOD_RES_PASSTHRU; } - void OnCleanup(int target_type, void* item) - { - be.DoCleanup(target_type, item); - } - void OnSyncChannel(Channel* chan, Module* proto, void* opaque) { be.DoSyncChannel(chan, proto, opaque);