From ee387569821b45581063f6bc349cccc643f9a293 Mon Sep 17 00:00:00 2001 From: Adam Date: Fri, 25 Feb 2011 21:40:43 -0500 Subject: Fixed a lot of small problems --- src/commands.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'src/commands.cpp') diff --git a/src/commands.cpp b/src/commands.cpp index 6944ac31e..b2e3b7192 100644 --- a/src/commands.cpp +++ b/src/commands.cpp @@ -141,6 +141,7 @@ void mod_run_cmd(BotInfo *bi, User *u, Command *c, const Anope::string &command, if (params.size() < c->MinParams) { c->OnSyntaxError(source, !params.empty() ? params[params.size() - 1] : ""); + source.DoReply(); PopLanguage(); return; } @@ -149,6 +150,7 @@ void mod_run_cmd(BotInfo *bi, User *u, Command *c, const Anope::string &command, FOREACH_RESULT(I_OnPreCommand, OnPreCommand(source, c, params)); if (MOD_RESULT == EVENT_STOP) { + source.DoReply(); PopLanguage(); return; } @@ -158,16 +160,16 @@ void mod_run_cmd(BotInfo *bi, User *u, Command *c, const Anope::string &command, { u->SendMessage(bi, LanguageString::ACCESS_DENIED); Log(LOG_COMMAND, "denied", bi) << "Access denied for user " << u->GetMask() << " with command " << command; + source.DoReply(); PopLanguage(); return; } CommandReturn ret = c->Execute(source, params); + if (ret == MOD_STOP) + return; - if (ret == MOD_CONT) - { - FOREACH_MOD(I_OnPostCommand, OnPostCommand(source, c, params)); - } + FOREACH_MOD(I_OnPostCommand, OnPostCommand(source, c, params)); source.DoReply(); } -- cgit