inspircd / inspircd

A modular C++ IRC server (ircd).
https://www.inspircd.org
1.14k stars 265 forks source link

STATS shows a denied announcement in v4 for some requests when it shouldn't #2051

Closed AndrioCelos closed 11 months ago

AndrioCelos commented 11 months ago

Description

Certain STATS requests provided by modules have return MOD_RES_DENY in the code to stop the core STATS code from also processing the request, but this causes the announcement to show that the request was denied by the module, even though it wasn't.

The following STATS requests have this issue:

Steps to reproduce the issue:

  1. Log in to an oper account with servers/auspex permission.
  2. Make any STATS request listed above.

Describe the results you received:

The output of the command was as follows:

@time=2023-07-12T02:52:18.483Z :REDACTED.test.andriocelos.net NOTICE Andrio :*** STATS: Stats 'o' denied for Andrio (Andrio@0::1)
@time=2023-07-12T02:52:18.483Z :REDACTED.test.andriocelos.net 210 Andrio o :Andrio (hosts: 192.168.0.0/24 172.26.176.0/20 127.0.0.0/8 ::1 fe80::/64, type: NetAdmin, channel modes: OP, user modes: OWhkos, snomasks: ACFGKLNOQRTVXacfgklnoqrtvx, commands: ALLTIME CBAN CHECK CHGHOST CHGIDENT CHGNAME CONNECT DIE ELINE FILTER GLINE GLOADMODULE GLOBOPS GRELOADMODULE GUNLOADMODULE KILL KLINE LOADMODULE MKPASSWD NICKLOCK NICKUNLOCK OJOIN QLINE RCONNECT REHASH RELOADMODULE RESTART RLINE RSQUIT SAJOIN SAKICK SAMODE SANICK SAPART SAQUIT SATOPIC 
@time=2023-07-12T02:52:18.483Z :REDACTED.test.andriocelos.net 210 Andrio o :Angelina (hosts: 172.26.176.0/20 127.0.0.0/8 ::1, type: Guardian, channel modes: OP, user modes: OWhkos, snomasks: none, commands: GLOBOPS WALLOPS, privileges: users/ignore-callerid users/ignore-commonchans users/ignore-privdeaf users/mass-message)
@time=2023-07-12T02:52:18.483Z :REDACTED.test.andriocelos.net 219 Andrio o :End of /STATS report

Describe the results you expected:

The announcement should instead show Stats 'o' requested by Andrio.

Additional information you deem important (e.g. issue happens only occasionally):

This issue does not occur in v3.16.1.

Output of ./bin/inspircd --version:

InspIRCd-4.0.0-5bd1fa992