]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_sqloper.cpp
Dynamically determine the size of the eventlist[] passed to Attach()
[user/henk/code/inspircd.git] / src / modules / m_sqloper.cpp
index 7620af7f3f0f3a19288fef101a47e99cd2b5ad85..03b6269630c04833431bd514c07cd328904c50b4 100644 (file)
@@ -145,7 +145,7 @@ public:
                OnRehash(NULL);
 
                Implementation eventlist[] = { I_OnRehash, I_OnPreCommand };
-               ServerInstance->Modules->Attach(eventlist, this, 2);
+               ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation));
        }
 
        void OnRehash(User* user)