X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_nonicks.cpp;h=672a48f8d9bca45091d980ebb5290efb4f2a64ca;hb=ccd4c11ea1a43d079eaae9708482ef4a9148796c;hp=4fa717d73084c1981f6ae8f1c546dbca88ab8d63;hpb=a4db7bf9af00b32d4f5c1922997d02b0b8be59e5;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_nonicks.cpp b/src/modules/m_nonicks.cpp index 4fa717d73..672a48f8d 100644 --- a/src/modules/m_nonicks.cpp +++ b/src/modules/m_nonicks.cpp @@ -35,11 +35,15 @@ class ModuleNoNickChange : public Module bool override; public: ModuleNoNickChange() : nn(this) + { + } + + void init() { OnRehash(NULL); - ServerInstance->Modes->AddMode(&nn); + ServerInstance->Modules->AddService(nn); Implementation eventlist[] = { I_OnUserPreNick, I_On005Numeric, I_OnRehash }; - ServerInstance->Modules->Attach(eventlist, this, 3); + ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation)); } virtual ~ModuleNoNickChange()