From 37b3535543b81c3d75c8f62b83d422f0d2fbced0 Mon Sep 17 00:00:00 2001 From: Adam Date: Mon, 27 May 2013 19:36:37 -0400 Subject: Initially attach all modules to all events, and detach them as the events are run if they are not implemented per module --- modules/commands/os_session.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'modules/commands/os_session.cpp') diff --git a/modules/commands/os_session.cpp b/modules/commands/os_session.cpp index af6a547f5..9496090db 100644 --- a/modules/commands/os_session.cpp +++ b/modules/commands/os_session.cpp @@ -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); } -- cgit