X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_botmode.cpp;h=b29c58240689be37d9e86a4d8be12193c860ef11;hb=8d419c3873cd3593baf4cc5f66bbe854a3a4614f;hp=3e7fd2fc659e5e3b377a6c165745e639c4237ab3;hpb=ac7defcd3e52695dcf5e5150e9fe3e1624205e64;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_botmode.cpp b/src/modules/m_botmode.cpp index 3e7fd2fc6..b29c58240 100644 --- a/src/modules/m_botmode.cpp +++ b/src/modules/m_botmode.cpp @@ -42,10 +42,9 @@ class ModuleBotMode : public Module void init() { - if (!ServerInstance->Modes->AddMode(&bm)) - throw ModuleException("Could not add new modes!"); + ServerInstance->Modules->AddService(bm); Implementation eventlist[] = { I_OnWhois }; - ServerInstance->Modules->Attach(eventlist, this, 1); + ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation)); } virtual ~ModuleBotMode()