1
0
mirror of https://github.com/anope/anope.git synced 2026-07-10 03:03: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
@@ -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