]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_sasl.cpp
Dynamically determine the size of the eventlist[] passed to Attach()
[user/henk/code/inspircd.git] / src / modules / m_sasl.cpp
index b653096b24566361685e7acafe391a4362bbf1db..943f45bd3755f93713f70d16a2529b4a8a3e803d 100644 (file)
@@ -249,7 +249,7 @@ class ModuleSASL : public Module
        {
                OnRehash(NULL);
                Implementation eventlist[] = { I_OnEvent, I_OnUserRegister, I_OnRehash };
-               ServerInstance->Modules->Attach(eventlist, this, 3);
+               ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation));
 
                ServiceProvider* providelist[] = { &auth, &sasl, &authExt };
                ServerInstance->Modules->AddServices(providelist, 3);