]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_exemptchanops.cpp
Dynamically determine the size of the eventlist[] passed to Attach()
[user/henk/code/inspircd.git] / src / modules / m_exemptchanops.cpp
index c6dc2d75d963c79755a73c4a23655ef37fa5d21a..9fac8e7adaea59e5af648eab22d6fb3cc16f3d3d 100644 (file)
@@ -121,7 +121,7 @@ class ModuleExemptChanOps : public Module
        {
                ServerInstance->Modules->AddService(eh.ec);
                Implementation eventlist[] = { I_OnRehash, I_OnSyncChannel };
-               ServerInstance->Modules->Attach(eventlist, this, 2);
+               ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation));
                ServerInstance->OnCheckExemption = &eh;
 
                OnRehash(NULL);