From ab501767a18eece2b3c553868d0c7cfbe496d658 Mon Sep 17 00:00:00 2001 From: Jos Ahrens Date: Mon, 2 Oct 2017 14:35:38 +0200 Subject: [PATCH] transperancy: Make the user aware that DEBUG mode is enabled. --- src/Client.cpp | 7 +++++++ src/IRCNetwork.cpp | 6 ++++++ 2 files changed, 13 insertions(+) diff --git a/src/Client.cpp b/src/Client.cpp index 11626bf9..9f651ecb 100644 --- a/src/Client.cpp +++ b/src/Client.cpp @@ -20,6 +20,7 @@ #include #include #include +#include using std::set; using std::map; @@ -88,6 +89,12 @@ CClient::~CClient() { void CClient::SendRequiredPasswordNotice() { PutClient(":irc.znc.in 464 " + GetNick() + " :Password required"); + if (CDebug::Debug()) { + PutClient( + ":irc.znc.in NOTICE " + GetNick() + " :*** " + "ZNC is presently running in DEBUG mode. Sensitive data during " + "your current session may be exposed to the host."); + } PutClient( ":irc.znc.in NOTICE " + GetNick() + " :*** " "You need to send your password. " diff --git a/src/IRCNetwork.cpp b/src/IRCNetwork.cpp index 5396b71e..8e61c412 100644 --- a/src/IRCNetwork.cpp +++ b/src/IRCNetwork.cpp @@ -23,6 +23,7 @@ #include #include #include +#include #include #include @@ -724,6 +725,11 @@ void CIRCNetwork::ClientConnected(CClient* pClient) { pClient->PutStatus( "You are currently disconnected from IRC. " "Use 'connect' to reconnect."); + + if (CDebug::Debug()) { + pClient->PutStatus("ZNC is presently running in DEBUG mode. Sensitive" + " data during your current session may be exposed to the host."); + } } void CIRCNetwork::ClientDisconnected(CClient* pClient) {