X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_banexception.cpp;h=1811f743de59e5dd7fc64124b1d66ba5ccb9cb32;hb=fc4fc43ec232407b38d7ca182cb92c5cac4287aa;hp=14908fafc19e01d0030c146927aeb15da7e6f296;hpb=81d7a5b538737cd568c30e158b408721ef1824c2;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_banexception.cpp b/src/modules/m_banexception.cpp index 14908fafc..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)