]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_timedbans.cpp
Dynamically determine the size of the eventlist[] passed to Attach()
[user/henk/code/inspircd.git] / src / modules / m_timedbans.cpp
index 70027473f2c91d3eaeb6d484b54ff058bf60a8f7..5023f4c01bd9a695e9c5712ac222eff9dc79a577 100644 (file)
@@ -118,7 +118,7 @@ class ModuleTimedBans : public Module
        {
                ServerInstance->AddCommand(&cmd);
                Implementation eventlist[] = { I_OnDelBan, I_OnBackgroundTimer };
-               ServerInstance->Modules->Attach(eventlist, this, 2);
+               ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation));
        }
 
        virtual ModResult OnDelBan(User* source, Channel* chan, const std::string &banmask)