X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_noctcp.cpp;h=1dd6fe34ad467d71617f55b52316685cc9b3e9b7;hb=7dd831383f7506e49f568d0684ee1ecb1f5dc90f;hp=b6044b3fecadd4ca2640d189b4832e7a23ddcc51;hpb=abd2ac5ca85811795d4e0e03d777924cc50c66ff;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_noctcp.cpp b/src/modules/m_noctcp.cpp index b6044b3fe..1dd6fe34a 100644 --- a/src/modules/m_noctcp.cpp +++ b/src/modules/m_noctcp.cpp @@ -39,10 +39,13 @@ class ModuleNoCTCP : public Module ModuleNoCTCP() : nc(this) { - if (!ServerInstance->Modes->AddMode(&nc)) - throw ModuleException("Could not add new modes!"); + } + + void init() + { + ServerInstance->Modules->AddService(nc); Implementation eventlist[] = { I_OnUserPreMessage, I_OnUserPreNotice, I_On005Numeric }; - ServerInstance->Modules->Attach(eventlist, this, 3); + ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation)); } virtual ~ModuleNoCTCP()