]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_hidechans.cpp
Dynamically determine the size of the eventlist[] passed to Attach()
[user/henk/code/inspircd.git] / src / modules / m_hidechans.cpp
index bb67c05a6a006848a3fc17d3da73cab39c5a23ed..b2497cbe0a195269cb4e6aaafbbbe88f0b1c571f 100644 (file)
@@ -44,7 +44,7 @@ class ModuleHideChans : public Module
                if (!ServerInstance->Modes->AddMode(&hm))
                        throw ModuleException("Could not add new modes!");
                Implementation eventlist[] = { I_OnWhoisLine, I_OnRehash };
-               ServerInstance->Modules->Attach(eventlist, this, 2);
+               ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation));
                OnRehash(NULL);
        }