m_stats: use oper:privs for /stats O

This commit is contained in:
Ed Kellett 2019-12-20 22:03:35 +00:00
parent 326ecd968b
commit b549e8e80d
No known key found for this signature in database
GPG key ID: CB9986DEF342FABC

View file

@ -171,7 +171,7 @@ static struct stats_cmd stats_cmd_table[256] = {
['M'] = HANDLER_NORM(stats_messages, false, NULL), ['M'] = HANDLER_NORM(stats_messages, false, NULL),
['n'] = HANDLER_NORM(stats_dnsbl, false, NULL), ['n'] = HANDLER_NORM(stats_dnsbl, false, NULL),
['o'] = HANDLER_NORM(stats_oper, false, NULL), ['o'] = HANDLER_NORM(stats_oper, false, NULL),
['O'] = HANDLER_NORM(stats_privset, false, "oper:general"), ['O'] = HANDLER_NORM(stats_privset, false, "oper:privs"),
['p'] = HANDLER_NORM(stats_operedup, false, NULL), ['p'] = HANDLER_NORM(stats_operedup, false, NULL),
['P'] = HANDLER_NORM(stats_ports, false, NULL), ['P'] = HANDLER_NORM(stats_ports, false, NULL),
['q'] = HANDLER_NORM(stats_tresv, false, "oper:general"), ['q'] = HANDLER_NORM(stats_tresv, false, "oper:general"),
@ -822,13 +822,6 @@ stats_capability(struct Client *client_p)
static void static void
stats_privset(struct Client *source_p) stats_privset(struct Client *source_p)
{ {
if (!HasPrivilege(source_p, "oper:privs"))
{
sendto_one(source_p, form_str(ERR_NOPRIVS),
me.name, source_p->name, "privs");
return;
}
privilegeset_report(source_p); privilegeset_report(source_p);
} }