summaryrefslogtreecommitdiff
path: root/modules/commands/ms_del.cpp
diff options
context:
space:
mode:
authorlethality <lethality@anope.org>2012-02-23 00:04:36 +0000
committerlethality <lethality@anope.org>2012-02-23 00:04:36 +0000
commitf01aab5f9bf5c14162438d1707e6e6cd9730c703 (patch)
tree4df360cd61e7dd1fd749d90e9dbe9e3cf1d739af /modules/commands/ms_del.cpp
parent826de43724d4584f9150a1fb8cebe8f49d9431a7 (diff)
parent3850b073ddf610415de54dced9ff134397779676 (diff)
Merge branch '1.9' of ssh://anope.git.sf.net/gitroot/anope/anope into 1.9
Diffstat (limited to 'modules/commands/ms_del.cpp')
-rw-r--r--modules/commands/ms_del.cpp10
1 files changed, 6 insertions, 4 deletions
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());