From 96f98ebbb654aa452ee821fbf1dd2caaf31d6325 Mon Sep 17 00:00:00 2001 From: cyberbotx Date: Mon, 23 Mar 2009 00:30:16 +0000 Subject: [PATCH] Really fix bug #1062, patch from Adam, BS ACT and BS SAY should no longer send revealing error messages to users without access. git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2186 5417fbe8-f217-4b02-8779-1006273d7864 --- src/core/bs_act.c | 12 ++++++------ src/core/bs_say.c | 13 +++++++------ 2 files changed, 13 insertions(+), 12 deletions(-) diff --git a/src/core/bs_act.c b/src/core/bs_act.c index 56fde927e..3c0472c7c 100644 --- a/src/core/bs_act.c +++ b/src/core/bs_act.c @@ -41,6 +41,12 @@ class CommandBSAct : public Command return MOD_CONT; } + if (!check_access(u, ci, CA_SAY)) + { + notice_lang(s_BotServ, u, ACCESS_DENIED); + return MOD_CONT; + } + if (!ci->bi) { notice_help(s_BotServ, u, BOT_NOT_ASSIGNED); @@ -53,12 +59,6 @@ class CommandBSAct : public Command return MOD_CONT; } - if (!check_access(u, ci, CA_SAY)) - { - notice_lang(s_BotServ, u, ACCESS_DENIED); - return MOD_CONT; - } - size_t i = 0; while ((i = params[1].find_first_of("\001"), i) && i != std::string::npos) { diff --git a/src/core/bs_say.c b/src/core/bs_say.c index 18f029b1c..e1c2934c8 100644 --- a/src/core/bs_say.c +++ b/src/core/bs_say.c @@ -43,6 +43,13 @@ class CommandBSSay : public Command return MOD_CONT; } + if (!check_access(u, ci, CA_SAY)) + { + notice_lang(s_BotServ, u, ACCESS_DENIED); + return MOD_CONT; + } + + if (!ci->bi) { notice_help(s_BotServ, u, BOT_NOT_ASSIGNED); @@ -55,12 +62,6 @@ class CommandBSSay : public Command return MOD_CONT; } - if (!check_access(u, ci, CA_SAY)) - { - notice_lang(s_BotServ, u, ACCESS_DENIED); - return MOD_CONT; - } - if (text[0] == '\001') { this->OnSyntaxError(u);