]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_chanlog.cpp
Dynamically determine the size of the eventlist[] passed to Attach()
[user/henk/code/inspircd.git] / src / modules / m_chanlog.cpp
index 123b2016431531615683b04ae3c62bd68af029c9..6dbc0e7a860418d1154d36b00646d5bfa38040f4 100644 (file)
@@ -35,7 +35,7 @@ class ModuleChanLog : public Module
        void init()
        {
                Implementation eventlist[] = { I_OnRehash, I_OnSendSnotice };
-               ServerInstance->Modules->Attach(eventlist, this, 2);
+               ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation));
 
                OnRehash(NULL);
        }