]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_filter.cpp
Dynamically determine the size of the eventlist[] passed to Attach()
[user/henk/code/inspircd.git] / src / modules / m_filter.cpp
index 683db179a69a29bc3f41d85540650fe25a68204e..eb9f17b75b33a216e6985d5f9970add279afd6f9 100644 (file)
@@ -300,7 +300,7 @@ void ModuleFilter::init()
 {
        ServerInstance->AddCommand(&filtcommand);
        Implementation eventlist[] = { I_OnPreCommand, I_OnStats, I_OnSyncNetwork, I_OnDecodeMetaData, I_OnUserPreMessage, I_OnUserPreNotice, I_OnRehash };
-       ServerInstance->Modules->Attach(eventlist, this, 7);
+       ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation));
        OnRehash(NULL);
 }