]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_nonicks.cpp
Merge pull request #1147 from SaberUK/insp20+gcc6
[user/henk/code/inspircd.git] / src / modules / m_nonicks.cpp
index 4fa717d73084c1981f6ae8f1c546dbca88ab8d63..672a48f8d9bca45091d980ebb5290efb4f2a64ca 100644 (file)
@@ -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()