From 0ba58d7d0eea4e2a0e0d18a66880f84af6fea60e Mon Sep 17 00:00:00 2001 From: Adam Date: Sat, 18 Feb 2012 18:07:34 -0500 Subject: Fixed some events --- modules/commands/ms_del.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'modules/commands/ms_del.cpp') 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()); -- cgit