]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_timedbans.cpp
m_messageflood Ask to be the last to handle OnUserPreMessage/OnUserPreNotice
[user/henk/code/inspircd.git] / src / modules / m_timedbans.cpp
index 472e79ca4c20b09fea5b078e407eee9fc3aac622..90e814a187d2af00c5e42e341fe16d6768593a6b 100644 (file)
@@ -112,15 +112,13 @@ class ModuleTimedBans : public Module
        ModuleTimedBans()
                : cmd(this)
        {
-               ServerInstance->AddCommand(&cmd);
-               TimedBanList.clear();
-               Implementation eventlist[] = { I_OnDelBan, I_OnBackgroundTimer };
-               ServerInstance->Modules->Attach(eventlist, this, 2);
        }
 
-       virtual ~ModuleTimedBans()
+       void init()
        {
-               TimedBanList.clear();
+               ServerInstance->Modules->AddService(cmd);
+               Implementation eventlist[] = { I_OnDelBan, I_OnBackgroundTimer };
+               ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation));
        }
 
        virtual ModResult OnDelBan(User* source, Channel* chan, const std::string &banmask)