X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_commonchans.cpp;h=afa17add4512d437f41d58ecdad182d40c9b52ad;hb=7dd831383f7506e49f568d0684ee1ecb1f5dc90f;hp=d91ab1231237cf56011ba2a71335cab44cf4831e;hpb=ac7defcd3e52695dcf5e5150e9fe3e1624205e64;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_commonchans.cpp b/src/modules/m_commonchans.cpp index d91ab1231..afa17add4 100644 --- a/src/modules/m_commonchans.cpp +++ b/src/modules/m_commonchans.cpp @@ -39,10 +39,9 @@ class ModulePrivacyMode : public Module void init() { - if (!ServerInstance->Modes->AddMode(&pm)) - throw ModuleException("Could not add new modes!"); + ServerInstance->Modules->AddService(pm); Implementation eventlist[] = { I_OnUserPreMessage, I_OnUserPreNotice }; - ServerInstance->Modules->Attach(eventlist, this, 2); + ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation)); } virtual ~ModulePrivacyMode()