]> 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 1a0734ed9b01506f3ec3d4949f5ad02602576847..cfc06866a90996ac7991f44d66305433fffd4e46 100644 (file)
@@ -46,11 +46,14 @@ class ModuleDelayMsg : public Module
  public:
        ModuleDelayMsg() : djm(this)
        {
-               if (!ServerInstance->Modes->AddMode(&djm))
-                       throw ModuleException("Could not add new modes!");
-               ServerInstance->Extensions.Register(&djm.jointime);
+       }
+
+       void init()
+       {
+               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&);