]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_delayjoin.cpp
Update example configs, README.md and more
[user/henk/code/inspircd.git] / src / modules / m_delayjoin.cpp
index 49ca93788331e061d6857d713cb84a6c6417fde9..a9a92e67a9b382a65f113e30a1879b36a97d39b4 100644 (file)
@@ -49,8 +49,8 @@ class ModuleDelayJoin : public Module
 
        void init()
        {
-               if (!ServerInstance->Modes->AddMode(&djm))
-                       throw ModuleException("Could not add new modes!");
+               ServerInstance->Modules->AddService(djm);
+               ServerInstance->Modules->AddService(unjoined);
                Implementation eventlist[] = { I_OnUserJoin, I_OnUserPart, I_OnUserKick, I_OnBuildNeighborList, I_OnNamesListItem, I_OnText, I_OnRawMode };
                ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation));
        }