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_defcon.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'modules/commands/os_defcon.cpp') diff --git a/modules/commands/os_defcon.cpp b/modules/commands/os_defcon.cpp index ba695649d..8bea10d0f 100644 --- a/modules/commands/os_defcon.cpp +++ b/modules/commands/os_defcon.cpp @@ -125,7 +125,7 @@ class DefConTimeout : public Timer if (DConfig.defaultlevel != level) { DConfig.defaultlevel = level; - FOREACH_MOD(I_OnDefconLevel, OnDefconLevel(level)); + FOREACH_MOD(OnDefconLevel, (level)); Log(Config->GetClient("OperServ"), "operserv/defcon") << "Defcon level timeout, returning to level " << level; if (DConfig.globalondefcon) @@ -203,7 +203,7 @@ class CommandOSDefcon : public Command DConfig.defaultlevel = newLevel; - FOREACH_MOD(I_OnDefconLevel, OnDefconLevel(newLevel)); + FOREACH_MOD(OnDefconLevel, (newLevel)); delete timeout; @@ -333,8 +333,6 @@ class OSDefcon : public Module OSDefcon(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, VENDOR), session_service("SessionService", "session"), akills("XLineManager", "xlinemanager/sgline"), commandosdefcon(this) { - Implementation i[] = { I_OnReload, I_OnChannelModeSet, I_OnChannelModeUnset, I_OnPreCommand, I_OnUserConnect, I_OnChannelModeAdd, I_OnChannelSync }; - ModuleManager::Attach(i, this, sizeof(i) / sizeof(Implementation)); } void OnReload(Configuration::Conf *conf) anope_override -- cgit