aboutsummaryrefslogtreecommitdiff
path: root/src/logging.cpp
diff options
context:
space:
mode:
authorGravatar Sadie Powell2023-01-09 18:30:09 +0000
committerGravatar Sadie Powell2023-01-09 18:33:37 +0000
commit610930faced65f418d21f03058519456f713505d (patch)
tree9b50b58d2dd2e7ccca3c62f5557d75cd2cd0c3ec /src/logging.cpp
parentFix enabling the raw I/O logging warning when <log:level> is rawio. (diff)
Deduplicate sending the raw I/O logging warning.
Diffstat (limited to 'src/logging.cpp')
-rw-r--r--src/logging.cpp7
1 files changed, 7 insertions, 0 deletions
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.