From 610930faced65f418d21f03058519456f713505d Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Mon, 9 Jan 2023 18:30:09 +0000 Subject: Deduplicate sending the raw I/O logging warning. --- src/logging.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/logging.cpp') diff --git a/src/logging.cpp b/src/logging.cpp index 249dd86e1..60c5d420a 100644 --- a/src/logging.cpp +++ b/src/logging.cpp @@ -18,6 +18,7 @@ #include "inspircd.h" +#include "clientprotocolmsg.h" const char* Log::LevelToString(Log::Level level) { @@ -178,6 +179,12 @@ void Log::Manager::EnableDebugMode() ServerInstance->Config->RawLog = true; } +void Log::Manager::NotifyRawIO(LocalUser* user, MessageType type) +{ + ClientProtocol::Messages::Privmsg msg(ServerInstance->FakeClient, user, "*** Raw I/O logging is enabled on this server. All messages, passwords, and commands are being recorded.", type); + user->Send(ServerInstance->GetRFCEvents().privmsg, msg); +} + void Log::Manager::OpenLogs(bool requiremethods) { // If the server is started in debug mode we don't write logs. -- cgit v1.3.1-10-gc9f91