1
0
mirror of https://github.com/anope/anope.git synced 2026-07-07 18:03:13 +02:00

Use better command access checking in webpanel for operserv/akill

This commit is contained in:
Adam
2014-02-13 19:42:02 -05:00
parent fc50edf046
commit f428d61045
2 changed files with 11 additions and 1 deletions
+1 -1
View File
@@ -16,7 +16,7 @@ bool WebCPanel::OperServ::Akill::OnRequest(HTTPProvider *server, const Anope::st
static ServiceReference<XLineManager> akills("XLineManager","xlinemanager/sgline");
if (!na->nc->IsServicesOper() && !(na->nc->o && na->nc->o->ot && na->nc->o->ot->HasPriv("operserv/akill")))
if (!na->nc->o || !na->nc->o->ot->HasCommand("operserv/akill"))
{
replacements["NOACCESS"];
}
+10
View File
@@ -240,6 +240,9 @@ namespace WebPanel
return;
}
if (params.size() < cmd->min_params)
return;
BotInfo *bi = Config->GetClient(service);
if (!bi)
{
@@ -263,6 +266,13 @@ namespace WebPanel
my_reply(r, key);
CommandSource source(user, NULL, nc, &my_reply, bi);
if (!cmd->AllowUnregistered() && !source.nc)
{
r[key] = "Access denied.";
return;
}
cmd->Execute(source, params);
}
}