]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_chghost.cpp
Dynamically determine the size of the eventlist[] passed to Attach()
[user/henk/code/inspircd.git] / src / modules / m_chghost.cpp
index d98e14d75b0e623f4ec815e5cacbb7f68e6a80e9..5855104def3ca8c37c6edcca156f9d374e9613cf 100644 (file)
@@ -100,7 +100,7 @@ class ModuleChgHost : public Module
                OnRehash(NULL);
                ServerInstance->AddCommand(&cmd);
                Implementation eventlist[] = { I_OnRehash };
-               ServerInstance->Modules->Attach(eventlist, this, 1);
+               ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation));
        }
 
        void OnRehash(User* user)