]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_allowinvite.cpp
Dynamically determine the size of the eventlist[] passed to Attach()
[user/henk/code/inspircd.git] / src / modules / m_allowinvite.cpp
index 7dd2efc242199a25c1989820ce3a2754f333fa7d..a53b934a68c016f1664b01f541424fb8b2172a56 100644 (file)
@@ -41,7 +41,7 @@ class ModuleAllowInvite : public Module
                if (!ServerInstance->Modes->AddMode(&ni))
                        throw ModuleException("Could not add new modes!");
                Implementation eventlist[] = { I_OnUserPreInvite, I_On005Numeric };
-               ServerInstance->Modules->Attach(eventlist, this, 2);
+               ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation));
        }
 
        virtual void On005Numeric(std::string &output)