From e7aa61b6e1a28a1ef0963fa8e20cc2a1f80fb2fb Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Thu, 23 Sep 2021 00:28:05 +0100 Subject: [PATCH] Change operlog to log to snomask o (oper). --- docs/conf/helpop.conf.example | 2 -- docs/conf/modules.conf.example | 2 +- src/modules/m_operlog.cpp | 7 +------ 3 files changed, 2 insertions(+), 9 deletions(-) diff --git a/docs/conf/helpop.conf.example b/docs/conf/helpop.conf.example index b1fd9927d..86a3e6f4e 100644 --- a/docs/conf/helpop.conf.example +++ b/docs/conf/helpop.conf.example @@ -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). diff --git a/docs/conf/modules.conf.example b/docs/conf/modules.conf.example index 40391d71b..423a44891 100644 --- a/docs/conf/modules.conf.example +++ b/docs/conf/modules.conf.example @@ -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. # diff --git a/src/modules/m_operlog.cpp b/src/modules/m_operlog.cpp index da1d1b462..da25ee432 100644 --- a/src/modules/m_operlog.cpp +++ b/src/modules/m_operlog.cpp @@ -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); }