Use ERR_NOPRIVS when an oper is not allowed to see admin-only /stats.
This includes opers without the admin flag and admins on other servers.
This commit is contained in:
parent
8682f1cb32
commit
9fc04df8c8
1 changed files with 7 additions and 2 deletions
|
@ -226,13 +226,18 @@ m_stats(struct Client *client_p, struct Client *source_p, int parc, const char *
|
||||||
/* Called for remote clients and for local opers, so check need_admin
|
/* Called for remote clients and for local opers, so check need_admin
|
||||||
* and need_oper
|
* and need_oper
|
||||||
*/
|
*/
|
||||||
if((stats_cmd_table[i].need_admin && !IsOperAdmin (source_p)) ||
|
if(stats_cmd_table[i].need_oper && !IsOper(source_p))
|
||||||
(stats_cmd_table[i].need_oper && !IsOper (source_p)))
|
|
||||||
{
|
{
|
||||||
sendto_one_numeric(source_p, ERR_NOPRIVILEGES,
|
sendto_one_numeric(source_p, ERR_NOPRIVILEGES,
|
||||||
form_str (ERR_NOPRIVILEGES));
|
form_str (ERR_NOPRIVILEGES));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
if(stats_cmd_table[i].need_admin && !IsOperAdmin(source_p))
|
||||||
|
{
|
||||||
|
sendto_one(source_p, form_str(ERR_NOPRIVS),
|
||||||
|
me.name, source_p->name, "admin");
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
/* Blah, stats L needs the parameters, none of the others do.. */
|
/* Blah, stats L needs the parameters, none of the others do.. */
|
||||||
if(statchar == 'L' || statchar == 'l')
|
if(statchar == 'L' || statchar == 'l')
|
||||||
|
|
Loading…
Reference in a new issue