]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_gecosban.cpp
Dynamically determine the size of the eventlist[] passed to Attach()
[user/henk/code/inspircd.git] / src / modules / m_gecosban.cpp
index 53cbf0fa4f8789f41eeb20dc362128efa446e5f0..1497c1b87b3f808503c80da9a03df7d22fb14669 100644 (file)
@@ -27,7 +27,7 @@ class ModuleGecosBan : public Module
        void init()
        {
                Implementation eventlist[] = { I_OnCheckBan, I_On005Numeric };
-               ServerInstance->Modules->Attach(eventlist, this, 2);
+               ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation));
        }
 
        ~ModuleGecosBan()