]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_chanhistory.cpp
Dynamically determine the size of the eventlist[] passed to Attach()
[user/henk/code/inspircd.git] / src / modules / m_chanhistory.cpp
index 16eba953f544fb05323c2fd3f269c760497e9305..8db4b2cf087160c90e39c00fd4e30b2855c5bf75 100644 (file)
@@ -121,7 +121,7 @@ class ModuleChanHistory : public Module
                ServerInstance->Modules->AddService(m);
 
                Implementation eventlist[] = { I_OnPostJoin, I_OnUserMessage, I_OnRehash };
-               ServerInstance->Modules->Attach(eventlist, this, 3);
+               ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation));
                OnRehash(NULL);
        }