1
0
mirror of https://github.com/anope/anope.git synced 2026-06-29 00:26:39 +02:00

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
This commit is contained in:
cyberbotx
2009-03-23 00:30:16 +00:00
parent d6522b5220
commit 96f98ebbb6
2 changed files with 13 additions and 12 deletions
+6 -6
View File
@@ -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)
{
+7 -6
View File
@@ -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);