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);