diff options
| author | Adam <Adam@anope.org> | 2012-02-18 18:07:34 -0500 |
|---|---|---|
| committer | Adam <Adam@anope.org> | 2012-02-18 18:07:34 -0500 |
| commit | 0ba58d7d0eea4e2a0e0d18a66880f84af6fea60e (patch) | |
| tree | 58d0311a585ebfef9abb304a412226505e0febfe /modules | |
| parent | 1536c5cf60dd183fb5c98651decde381a91ada44 (diff) | |
Fixed some events
Diffstat (limited to 'modules')
| -rw-r--r-- | modules/commands/cs_akick.cpp | 4 | ||||
| -rw-r--r-- | modules/commands/ms_del.cpp | 10 | ||||
| -rw-r--r-- | modules/commands/os_akill.cpp | 2 |
3 files changed, 11 insertions, 5 deletions
diff --git a/modules/commands/cs_akick.cpp b/modules/commands/cs_akick.cpp index 328a169d4..beaa8ffd3 100644 --- a/modules/commands/cs_akick.cpp +++ b/modules/commands/cs_akick.cpp @@ -207,6 +207,8 @@ class CommandCSAKick : public Command if (!Number || Number > ci->GetAkickCount()) return; + FOREACH_MOD(I_OnAkickDel, OnAkickDel(source.u, ci, ci->GetAkick(Number - 1))); + ++Deleted; ci->EraseAkick(Number - 1); } @@ -236,6 +238,8 @@ class CommandCSAKick : public Command bool override = !ci->AccessFor(u).HasPriv("AKICK"); Log(override ? LOG_OVERRIDE : LOG_COMMAND, u, this, ci) << "to delete " << mask; + FOREACH_MOD(I_OnAkickDel, OnAkickDel(u, ci, ci->GetAkick(i))); + ci->EraseAkick(i); source.Reply(_("\002%s\002 deleted from %s autokick list."), mask.c_str(), ci->name.c_str()); diff --git a/modules/commands/ms_del.cpp b/modules/commands/ms_del.cpp index f0b65eeac..65969b025 100644 --- a/modules/commands/ms_del.cpp +++ b/modules/commands/ms_del.cpp @@ -107,13 +107,15 @@ class CommandMSDel : public Command } else { - if (ci) - FOREACH_MOD(I_OnMemoDel, OnMemoDel(ci, mi, NULL)); - else - FOREACH_MOD(I_OnMemoDel, OnMemoDel(u->Account(), mi, NULL)); /* Delete all memos. */ for (unsigned i = 0, end = mi->memos.size(); i < end; ++i) + { + if (ci) + FOREACH_MOD(I_OnMemoDel, OnMemoDel(ci, mi, mi->memos[i])); + else + FOREACH_MOD(I_OnMemoDel, OnMemoDel(u->Account(), mi, mi->memos[i])); delete mi->memos[i]; + } mi->memos.clear(); if (!chan.empty()) source.Reply(_("All memos for channel %s have been deleted."), chan.c_str()); diff --git a/modules/commands/os_akill.cpp b/modules/commands/os_akill.cpp index 89485f706..d886ce2b3 100644 --- a/modules/commands/os_akill.cpp +++ b/modules/commands/os_akill.cpp @@ -316,11 +316,11 @@ class CommandOSAKill : public Command void DoClear(CommandSource &source) { User *u = source.u; - FOREACH_MOD(I_OnDelXLine, OnDelXLine(u, NULL, akills)); for (unsigned i = akills->GetCount(); i > 0; --i) { XLine *x = akills->GetEntry(i - 1); + FOREACH_MOD(I_OnDelXLine, OnDelXLine(u, x, akills)); akills->DelXLine(x); } |
