1
0
mirror of https://github.com/anope/anope.git synced 2026-07-03 02:43:13 +02:00

Initially attach all modules to all events, and detach them as the events are run if they are not implemented per module

This commit is contained in:
Adam
2013-05-27 19:36:37 -04:00
parent c21e8d9204
commit 37b3535543
120 changed files with 440 additions and 672 deletions
+2 -4
View File
@@ -156,7 +156,7 @@ class ExceptionDelCallback : public NumberList
static void DoDel(CommandSource &source, unsigned index)
{
Exception *e = session_service->GetExceptions()[index];
FOREACH_MOD(I_OnExceptionDel, OnExceptionDel(source, e));
FOREACH_MOD(OnExceptionDel, (source, e));
session_service->DelException(e);
delete e;
@@ -360,7 +360,7 @@ class CommandOSException : public Command
exception->expires = expires;
EventReturn MOD_RESULT;
FOREACH_RESULT(I_OnExceptionAdd, OnExceptionAdd(exception));
FOREACH_RESULT(OnExceptionAdd, MOD_RESULT, (exception));
if (MOD_RESULT == EVENT_STOP)
delete exception;
else
@@ -619,8 +619,6 @@ class OSSession : public Module
{
this->SetPermanent(true);
Implementation i[] = { I_OnReload, I_OnUserConnect, I_OnUserQuit, I_OnExpireTick };
ModuleManager::Attach(i, this, sizeof(i) / sizeof(Implementation));
ModuleManager::SetPriority(this, PRIORITY_FIRST);
}