X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_noctcp.cpp;h=1dd6fe34ad467d71617f55b52316685cc9b3e9b7;hb=7dd831383f7506e49f568d0684ee1ecb1f5dc90f;hp=144ac312b145641bdf1f1413fc46b4ab47b63f63;hpb=ac7defcd3e52695dcf5e5150e9fe3e1624205e64;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_noctcp.cpp b/src/modules/m_noctcp.cpp index 144ac312b..1dd6fe34a 100644 --- a/src/modules/m_noctcp.cpp +++ b/src/modules/m_noctcp.cpp @@ -43,10 +43,9 @@ class ModuleNoCTCP : public Module void init() { - if (!ServerInstance->Modes->AddMode(&nc)) - throw ModuleException("Could not add new modes!"); + 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()