diff options
Diffstat (limited to 'modules/commands')
-rw-r--r-- | modules/commands/os_akill.cpp | 8 | ||||
-rw-r--r-- | modules/commands/os_sxline.cpp | 8 |
2 files changed, 14 insertions, 2 deletions
diff --git a/modules/commands/os_akill.cpp b/modules/commands/os_akill.cpp index 3b82fb5fb..ea8b2e40c 100644 --- a/modules/commands/os_akill.cpp +++ b/modules/commands/os_akill.cpp @@ -379,7 +379,13 @@ class CommandOSAKill : public Command { User *u = source.u; FOREACH_MOD(I_OnDelXLine, OnDelXLine(u, NULL, akills)); - akills->Clear(); + + for (unsigned i = akills->GetCount(); i > 0; --i) + { + XLine *x = akills->GetEntry(i - 1); + akills->DelXLine(x); + } + source.Reply(_("The AKILL list has been cleared.")); return; diff --git a/modules/commands/os_sxline.cpp b/modules/commands/os_sxline.cpp index 56444383d..fb5b7f244 100644 --- a/modules/commands/os_sxline.cpp +++ b/modules/commands/os_sxline.cpp @@ -272,7 +272,13 @@ class CommandOSSXLineBase : public Command { User *u = source.u; FOREACH_MOD(I_OnDelXLine, OnDelXLine(u, NULL, this->xlm())); - this->xlm()->Clear(); + + for (unsigned i = this->xlm()->GetCount(); i > 0; --i) + { + XLine *x = this->xlm()->GetEntry(i - 1); + this->xlm()->DelXLine(x); + } + source.Reply(_("The %s list has been cleared."), this->name.c_str()); return; |