]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_delaymsg.cpp
Fix issue #657, fix sending FNAME with spaces
[user/henk/code/inspircd.git] / src / modules / m_delaymsg.cpp
index 63da04a63cedfb7cfe27378a93c31b787d94585c..cfc06866a90996ac7991f44d66305433fffd4e46 100644 (file)
@@ -50,11 +50,10 @@ class ModuleDelayMsg : public Module
 
        void init()
        {
-               if (!ServerInstance->Modes->AddMode(&djm))
-                       throw ModuleException("Could not add new modes!");
-               ServerInstance->Extensions.Register(&djm.jointime);
+               ServerInstance->Modules->AddService(djm);
+               ServerInstance->Modules->AddService(djm.jointime);
                Implementation eventlist[] = { I_OnUserJoin, I_OnUserPreMessage};
-               ServerInstance->Modules->Attach(eventlist, this, 2);
+               ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation));
        }
        Version GetVersion();
        void OnUserJoin(Membership* memb, bool sync, bool created, CUList&);