1
0
mirror of https://github.com/anope/anope.git synced 2026-07-08 07:43:15 +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
+6 -6
View File
@@ -27,9 +27,9 @@ class MemoDelCallback : public NumberList
return;
if (ci)
FOREACH_MOD(I_OnMemoDel, OnMemoDel(ci, mi, mi->GetMemo(number - 1)));
FOREACH_MOD(OnMemoDel, (ci, mi, mi->GetMemo(number - 1)));
else
FOREACH_MOD(I_OnMemoDel, OnMemoDel(source.nc, mi, mi->GetMemo(number - 1)));
FOREACH_MOD(OnMemoDel, (source.nc, mi, mi->GetMemo(number - 1)));
mi->Del(number - 1);
source.Reply(_("Memo %d has been deleted."), number);
@@ -97,9 +97,9 @@ class CommandMSDel : public Command
{
/* Delete last memo. */
if (ci)
FOREACH_MOD(I_OnMemoDel, OnMemoDel(ci, mi, mi->GetMemo(mi->memos->size() - 1)));
FOREACH_MOD(OnMemoDel, (ci, mi, mi->GetMemo(mi->memos->size() - 1)));
else
FOREACH_MOD(I_OnMemoDel, OnMemoDel(source.nc, mi, mi->GetMemo(mi->memos->size() - 1)));
FOREACH_MOD(OnMemoDel, (source.nc, mi, mi->GetMemo(mi->memos->size() - 1)));
mi->Del(mi->memos->size() - 1);
source.Reply(_("Memo %d has been deleted."), mi->memos->size() + 1);
}
@@ -109,9 +109,9 @@ class CommandMSDel : public Command
for (unsigned i = 0, end = mi->memos->size(); i < end; ++i)
{
if (ci)
FOREACH_MOD(I_OnMemoDel, OnMemoDel(ci, mi, mi->GetMemo(i)));
FOREACH_MOD(OnMemoDel, (ci, mi, mi->GetMemo(i)));
else
FOREACH_MOD(I_OnMemoDel, OnMemoDel(source.nc, mi, mi->GetMemo(i)));
FOREACH_MOD(OnMemoDel, (source.nc, mi, mi->GetMemo(i)));
delete mi->GetMemo(i);
}
mi->memos->clear();