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