]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_services_account.cpp
Dynamically determine the size of the eventlist[] passed to Attach()
[user/henk/code/inspircd.git] / src / modules / m_services_account.cpp
index a325275779cd78faae85958de34b271e67ddd948..5b92c8a2666d82d28ac660fbf4b699113500dca7 100644 (file)
@@ -129,7 +129,7 @@ class ModuleServicesAccount : public Module
                Implementation eventlist[] = { I_OnWhois, I_OnUserPreMessage, I_OnUserPreNotice, I_OnUserPreJoin, I_OnCheckBan,
                        I_OnDecodeMetaData, I_On005Numeric, I_OnUserPostNick, I_OnSetConnectClass };
 
-               ServerInstance->Modules->Attach(eventlist, this, 9);
+               ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation));
        }
 
        void On005Numeric(std::string &t)