From a9b90ecb4329498aba52da6aaa9812e3a70b8e11 Mon Sep 17 00:00:00 2001 From: brain Date: Mon, 26 Dec 2005 17:26:16 +0000 Subject: Adding hook type checking to event calls to speed them up git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@2653 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/inspircd.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/inspircd.cpp') diff --git a/src/inspircd.cpp b/src/inspircd.cpp index e65816f48..33190e171 100644 --- a/src/inspircd.cpp +++ b/src/inspircd.cpp @@ -67,6 +67,7 @@ int WHOWAS_MAX = 100; // default 100 people maximum in the WHOWAS list extern std::vector modules; extern std::vector factory; + std::vector module_sockets; std::vector local_users; @@ -293,7 +294,7 @@ bool InspIRCd::UnloadModule(const char* filename) { modules[j]->OnCleanup(TYPE_USER,u->second); } - FOREACH_MOD OnUnloadModule(modules[j],Config->module_names[j]); + FOREACH_MOD(I_OnUnloadModule,OnUnloadModule(modules[j],Config->module_names[j])); // found the module log(DEBUG,"Deleting module..."); erase_module(j); @@ -358,6 +359,7 @@ bool InspIRCd::LoadModule(const char* filename) /* save the module and the module's classfactory, if * this isnt done, random crashes can occur :/ */ Config->module_names.push_back(filename); + modules[MODCOUNT+1]->Implements(Config->implement_lists[MODCOUNT+1]); } else { @@ -375,7 +377,7 @@ bool InspIRCd::LoadModule(const char* filename) } #endif MODCOUNT++; - FOREACH_MOD OnLoadModule(modules[MODCOUNT],filename_str); + FOREACH_MOD(I_OnLoadModule,OnLoadModule(modules[MODCOUNT],filename_str)); return true; } @@ -430,7 +432,7 @@ int InspIRCd::Run() if (((TIME % 8) == 0) && (!expire_run)) { expire_lines(); - FOREACH_MOD OnBackgroundTimer(TIME); + FOREACH_MOD(I_OnBackgroundTimer,OnBackgroundTimer(TIME)); expire_run = true; continue; } -- cgit v1.3.1-10-gc9f91