1
0
mirror of https://github.com/anope/anope.git synced 2026-07-07 07:13:12 +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
@@ -74,7 +74,7 @@ class CommandCSSuspend : public Command
Log(LOG_ADMIN, source, this, ci) << (!reason.empty() ? reason : "No reason") << ", expires in " << (expiry_secs ? Anope::strftime(Anope::CurTime + expiry_secs) : "never");
source.Reply(_("Channel \002%s\002 is now suspended."), ci->name.c_str());
FOREACH_MOD(I_OnChanSuspend, OnChanSuspend(ci));
FOREACH_MOD(OnChanSuspend, (ci));
return;
}
@@ -136,7 +136,7 @@ class CommandCSUnSuspend : public Command
source.Reply(_("Channel \002%s\002 is now released."), ci->name.c_str());
FOREACH_MOD(I_OnChanUnsuspend, OnChanUnsuspend(ci));
FOREACH_MOD(OnChanUnsuspend, (ci));
return;
}
@@ -161,8 +161,6 @@ class CSSuspend : public Module
commandcssuspend(this), commandcsunsuspend(this)
{
Implementation i[] = { I_OnChanInfo, I_OnPreChanExpire, I_OnCheckKick };
ModuleManager::Attach(i, this, sizeof(i) / sizeof(Implementation));
}
void OnChanInfo(CommandSource &source, ChannelInfo *ci, InfoFormatter &info, bool show_hidden) anope_override