diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2005-12-26 17:26:16 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2005-12-26 17:26:16 +0000 |
commit | a9b90ecb4329498aba52da6aaa9812e3a70b8e11 (patch) | |
tree | 38053a6bfa07486c6fc5cc46ebddb5e32306014a /src/inspircd.cpp | |
parent | dab3dc93c177400a749400c61c9253be055b78e3 (diff) |
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
Diffstat (limited to 'src/inspircd.cpp')
-rw-r--r-- | src/inspircd.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
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<Module*> modules; extern std::vector<ircd_module*> factory; + std::vector<InspSocket*> module_sockets; std::vector<userrec*> 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; } |