summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2005-12-26 21:45:15 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2005-12-26 21:45:15 +0000
commitd63e0473ba5b9117d484cf58af78832515334e3a (patch)
treee0a62e2080bfaa37900a31330180f3bc95e4f96b /src
parent030a57b3f31c057e2e8574c1ab7e09f3982252ca (diff)
Added global_implementation array, bypasses calls which *NO* modules are currently implementing
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@2670 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src')
-rw-r--r--src/inspircd.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/inspircd.cpp b/src/inspircd.cpp
index f15fba3a0..b560a2de6 100644
--- a/src/inspircd.cpp
+++ b/src/inspircd.cpp
@@ -193,6 +193,9 @@ InspIRCd::InspIRCd(int argc, char** argv)
CheckDie();
stats->BoundPortCount = BindPorts();
+ for(int t = 0; t < 255; t++)
+ Config->global_implementation[t] = 0;
+
printf("\n");
if (!Config->nofork)
{
@@ -294,6 +297,10 @@ bool InspIRCd::UnloadModule(const char* filename)
{
modules[j]->OnCleanup(TYPE_USER,u->second);
}
+
+ for(int t = 0; t < 255; t++)
+ Config->global_implementation[t] -= implement_lists[j][t];
+
FOREACH_MOD(I_OnUnloadModule,OnUnloadModule(modules[j],Config->module_names[j]));
// found the module
log(DEBUG,"Deleting module...");
@@ -365,6 +372,9 @@ bool InspIRCd::LoadModule(const char* filename)
x[t] = 0;
modules[MODCOUNT+1]->Implements(x);
+
+ for(int t = 0; t < 255; t++)
+ Config->global_implementation[t] += implement_lists[MODCOUNT+1][t];
}
else
{