Change operlog to log to snomask o (oper).

This commit is contained in:
Sadie Powell 2021-09-23 00:28:05 +01:00
parent b5d7c56428
commit e7aa61b6e1
3 changed files with 2 additions and 9 deletions

View File

@ -1056,8 +1056,6 @@ Note that all /STATS use is broadcast to online server operators.
O Allows receipt of remote oper-up, oper-down, and oper-failure messages.
q Allows receipt of local quit messages.
Q Allows receipt of remote quit messages.
r Allows receipt of local oper commands (requires the operlog module).
R Allows receipt of remote oper commands (requires the operlog module).
t Allows receipt of attempts to use /STATS (local and remote).
v Allows receipt of oper override notices (requires the override module).
x Allows receipt of local X-line notices (G/Z/Q/K/E/R/SHUN/CBan).

View File

@ -1530,7 +1530,7 @@
#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
# Oper log module: Logs all oper commands to the server log (with log
# type "m_operlog" at default loglevel), and optionally to the 'r'
# type "m_operlog" at default loglevel), and optionally to the 'o'
# snomask.
# This module is oper-only.
#<module name="operlog">

View File

@ -38,11 +38,6 @@ class ModuleOperLog
{
}
void init() override
{
ServerInstance->SNO.EnableSnomask('r', "OPERLOG");
}
void ReadConfig(ConfigStatus& status) override
{
tosnomask = ServerInstance->Config->ConfValue("operlog")->getBool("tosnomask", false);
@ -61,7 +56,7 @@ class ModuleOperLog
{
std::string msg = "[" + user->GetFullRealHost() + "] " + command + " " + stdalgo::string::join(parameters);
if (tosnomask)
ServerInstance->SNO.WriteGlobalSno('r', msg);
ServerInstance->SNO.WriteGlobalSno('o', msg);
else
ServerInstance->Logs.Log(MODNAME, LOG_DEFAULT, msg);
}