From 8562f6130489c255da994e527bed047223d2b970 Mon Sep 17 00:00:00 2001 From: Christian Heusel Date: Mon, 7 Nov 2022 23:15:51 +0100 Subject: [PATCH 1/7] allow identifiers in the test setup --- test/integration/framework/znctest.cpp | 8 ++++++-- test/integration/framework/znctest.h | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/test/integration/framework/znctest.cpp b/test/integration/framework/znctest.cpp index 58c3f926..e06cb834 100644 --- a/test/integration/framework/znctest.cpp +++ b/test/integration/framework/znctest.cpp @@ -72,11 +72,15 @@ Socket ZNCTest::ConnectClient() { return WrapIO(&sock); } -Socket ZNCTest::LoginClient() { +Socket ZNCTest::LoginClient(QString identifier) { auto client = ConnectClient(); client.Write("PASS :hunter2"); client.Write("NICK nick"); - client.Write("USER user/test x x :x"); + if ( identifier.length() == 0 ) { + client.Write("USER user/test x x :x"); + } else { + client.Write("USER user@" + identifier.toUtf8() + "/test x x :x"); + } return client; } diff --git a/test/integration/framework/znctest.h b/test/integration/framework/znctest.h index c03591ef..c3ce7c9e 100644 --- a/test/integration/framework/znctest.h +++ b/test/integration/framework/znctest.h @@ -37,7 +37,7 @@ class ZNCTest : public testing::Test { Socket ConnectIRCd(); Socket ConnectClient(); - Socket LoginClient(); + Socket LoginClient(QString identifier = ""); std::unique_ptr Run(); From bcf6e2fba696fc9737db92858e6deecead18114c Mon Sep 17 00:00:00 2001 From: Christian Heusel Date: Mon, 7 Nov 2022 23:16:25 +0100 Subject: [PATCH 2/7] add test for the "clientnotify" module --- test/integration/tests/modules.cpp | 44 ++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) diff --git a/test/integration/tests/modules.cpp b/test/integration/tests/modules.cpp index 1a35c44f..7da1f159 100644 --- a/test/integration/tests/modules.cpp +++ b/test/integration/tests/modules.cpp @@ -54,6 +54,50 @@ TEST_F(ZNCTest, NotifyConnectModule) { "NOTICE nick :*** user@identifier detached from 127.0.0.1"); } +TEST_F(ZNCTest, ClientNotifyModule) { + auto znc = Run(); + auto ircd = ConnectIRCd(); + auto client = LoginClient(); + client.Write("znc loadmod clientnotify"); + client.ReadUntil("Loaded module"); + + auto check_not_sent = [](Socket& client, QString wrongAnswer){ + auto result = client.ReadRemainder(); + EXPECT_FALSE(result.contains(wrongAnswer.toUtf8())) << "Got an answer even though we didnt want one with the given configuration"; + }; + + auto client2 = LoginClient(); + client.ReadUntil(":Another client (127.0.0.1) authenticated as your user. Use the 'ListClients' command to see all 2 clients."); + auto client3 = LoginClient(); + client.ReadUntil(":Another client (127.0.0.1) authenticated as your user. Use the 'ListClients' command to see all 3 clients."); + + // disable notifications for every message + client.Write("PRIVMSG *clientnotify :NewOnly on"); + + // check that we do not ge a notification after connecting from a know ip + auto client4 = LoginClient(); + check_not_sent(client, ":Another client (127.0.0.1) authenticated as your user. Use the 'ListClients' command to see all 4 clients."); + + // choose to notify only on new client ids + client.Write("PRIVMSG *clientnotify :NewNotifyOn clientid"); + + auto client5 = LoginClient("identifier123"); + client.ReadUntil(":Another client (identifier123) authenticated as your user. Use the 'ListClients' command to see all 5 clients."); + auto client6 = LoginClient("identifier123"); + check_not_sent(client, ":Another client (identifier123) authenticated as your user. Use the 'ListClients' command to see all 6 clients."); + + auto client7 = LoginClient("not_identifier123"); + client.ReadUntil(":Another client (not_identifier123) authenticated as your user. Use the 'ListClients' command to see all 7 clients."); + + // choose to notify from both clientids and new IPs + client.Write("PRIVMSG *clientnotify :NewNotifyOn both"); + + auto client8 = LoginClient(); + check_not_sent(client, ":Another client (127.0.0.1) authenticated as your user. Use the 'ListClients' command to see all 8 clients."); + auto client9 = LoginClient("definitely_not_identifier123"); + client.ReadUntil(":Another client (definitely_not_identifier123) authenticated as your user. Use the 'ListClients' command to see all 9 clients."); +} + TEST_F(ZNCTest, ShellModule) { auto znc = Run(); auto ircd = ConnectIRCd(); From 5fb8891da4048cc46fdd0ac89e01cf98c9d4c062 Mon Sep 17 00:00:00 2001 From: Christian Heusel Date: Mon, 7 Nov 2022 20:57:33 +0100 Subject: [PATCH 3/7] implement the new notification logic related to https://github.com/znc/znc/issues/1840 --- modules/clientnotify.cpp | 78 +++++++++++++++++++++++++++++++++------- 1 file changed, 66 insertions(+), 12 deletions(-) diff --git a/modules/clientnotify.cpp b/modules/clientnotify.cpp index 596bc31f..218e91bd 100644 --- a/modules/clientnotify.cpp +++ b/modules/clientnotify.cpp @@ -22,14 +22,19 @@ using std::set; class CClientNotifyMod : public CModule { protected: CString m_sMethod; + CString m_sNewNotifyOn; bool m_bNewOnly{}; bool m_bOnDisconnect{}; + bool m_bNotifyOnNewIP{}; + bool m_bNotifyOnNewClientID{}; - set m_sClientsSeen; + set m_sClientsSeenIP; + set m_sClientsSeenID; void SaveSettings() { SetNV("method", m_sMethod); SetNV("newonly", m_bNewOnly ? "1" : "0"); + SetNV("newnotifyon", m_sNewNotifyOn); SetNV("ondisconnect", m_bOnDisconnect ? "1" : "0"); } @@ -48,8 +53,11 @@ class CClientNotifyMod : public CModule { t_d("Sets the notify method"), [=](const CString& sLine) { OnMethodCommand(sLine); }); AddCommand("NewOnly", t_d(""), - t_d("Turns notifications for unseen IP addresses on or off"), + t_d("Turns notifications for unseen connections on or off"), [=](const CString& sLine) { OnNewOnlyCommand(sLine); }); + AddCommand("NewNotifyOn", t_d(""), + t_d("Specifies whether you want to be notified about new connections with new IPs, new ClientIDs connecting or in bot cases"), + [=](const CString& sLine) { OnNewNotifyOn(sLine); }); AddCommand( "OnDisconnect", t_d(""), t_d("Turns notifications for clients disconnecting on or off"), @@ -66,6 +74,11 @@ class CClientNotifyMod : public CModule { m_sMethod = "message"; } + if (m_sNewNotifyOn != "ip" && m_sNewNotifyOn != "clientid" && + m_sNewNotifyOn != "both") { + m_sNewNotifyOn = "ip"; + } + // default = off for these: m_bNewOnly = (GetNV("newonly") == "1"); @@ -76,18 +89,37 @@ class CClientNotifyMod : public CModule { void OnClientLogin() override { CString sRemoteIP = GetClient()->GetRemoteIP(); - if (!m_bNewOnly || - m_sClientsSeen.find(sRemoteIP) == m_sClientsSeen.end()) { + CString sRemoteClientID = GetClient()->GetIdentifier(); + + CString& sClientNameMessage = sRemoteIP; + if (m_bNotifyOnNewClientID and sRemoteClientID != "") { + sClientNameMessage = sRemoteClientID; + } + + auto sendLoginNotification = [&]() { SendNotification(t_p("", - "Another client authenticated as your user. " - "Use the 'ListClients' command to see all {1} " + "Another client ({1}) authenticated as your user. " + "Use the 'ListClients' command to see all {2} " "clients.", GetUser()->GetAllClients().size())( - GetUser()->GetAllClients().size())); + sClientNameMessage, GetUser()->GetAllClients().size())); + }; - // the set<> will automatically disregard duplicates: - m_sClientsSeen.insert(sRemoteIP); + if (m_bNewOnly) { + // see if we actually got a new client + // TODO: replace setName.find(...) == setName.end() with !setName.contains() once ZNC uses C++20 + if ((m_bNotifyOnNewIP && (m_sClientsSeenIP.find(sRemoteIP) == m_sClientsSeenIP.end())) || + (m_bNotifyOnNewClientID && (m_sClientsSeenID.find(sRemoteClientID) == m_sClientsSeenID.end()))) { + sendLoginNotification(); + } } + else { + sendLoginNotification(); + } + + // the set<> will automatically disregard duplicates: + m_sClientsSeenIP.insert(sRemoteIP); + m_sClientsSeenID.insert(sRemoteClientID); } void OnClientDisconnect() override { @@ -127,6 +159,28 @@ class CClientNotifyMod : public CModule { PutModule(t_s("Saved.")); } + void OnNewNotifyOn(const CString& sCommand) { + const CString sArg = sCommand.Token(1, true).AsLower(); + + if (sArg != "ip" && sArg != "clientid" && sArg != "both") { + PutModule(t_s("Usage: NewNotifyOn ")); + return; + } + + if (sArg == "both") { + m_bNotifyOnNewIP = true; + m_bNotifyOnNewClientID = true; + } else if (sArg == "ip") { + m_bNotifyOnNewIP = true; + } else if (sArg == "clientid") { + m_bNotifyOnNewClientID = true; + } + + m_sNewNotifyOn = sArg; + SaveSettings(); + PutModule(t_s("Saved.")); + } + void OnDisconnectCommand(const CString& sCommand) { const CString sArg = sCommand.Token(1, true).AsLower(); @@ -142,9 +196,9 @@ class CClientNotifyMod : public CModule { void OnShowCommand(const CString& sLine) { PutModule( - t_f("Current settings: Method: {1}, for unseen IP addresses only: " - "{2}, notify on disconnecting clients: {3}")( - m_sMethod, m_bNewOnly, m_bOnDisconnect)); + t_f("Current settings: Method: {1}, for unseen only: " + "{2}, unseen notify method: {3}, notify on disconnecting clients: {4}")( + m_sMethod, m_bNewOnly, m_sNewNotifyOn, m_bOnDisconnect)); } }; From 1e90b8a1856aa58eb4ea786b957025ff8e773f28 Mon Sep 17 00:00:00 2001 From: Christian Heusel Date: Thu, 17 Nov 2022 18:11:36 +0100 Subject: [PATCH 4/7] re-add the ip to the user message --- modules/clientnotify.cpp | 6 +++--- test/integration/tests/modules.cpp | 17 +++++++++-------- 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/modules/clientnotify.cpp b/modules/clientnotify.cpp index 218e91bd..bb1560be 100644 --- a/modules/clientnotify.cpp +++ b/modules/clientnotify.cpp @@ -91,9 +91,9 @@ class CClientNotifyMod : public CModule { CString sRemoteIP = GetClient()->GetRemoteIP(); CString sRemoteClientID = GetClient()->GetIdentifier(); - CString& sClientNameMessage = sRemoteIP; - if (m_bNotifyOnNewClientID and sRemoteClientID != "") { - sClientNameMessage = sRemoteClientID; + CString sClientNameMessage{sRemoteIP}; + if (m_bNotifyOnNewClientID && sRemoteClientID != "") { + sClientNameMessage += " / " + sRemoteClientID; } auto sendLoginNotification = [&]() { diff --git a/test/integration/tests/modules.cpp b/test/integration/tests/modules.cpp index 7da1f159..3c19824b 100644 --- a/test/integration/tests/modules.cpp +++ b/test/integration/tests/modules.cpp @@ -20,6 +20,7 @@ #include "znctest.h" using testing::HasSubstr; +using testing::Not; namespace znc_inttest { namespace { @@ -61,9 +62,9 @@ TEST_F(ZNCTest, ClientNotifyModule) { client.Write("znc loadmod clientnotify"); client.ReadUntil("Loaded module"); - auto check_not_sent = [](Socket& client, QString wrongAnswer){ - auto result = client.ReadRemainder(); - EXPECT_FALSE(result.contains(wrongAnswer.toUtf8())) << "Got an answer even though we didnt want one with the given configuration"; + auto check_not_sent = [](Socket& client, std::string wrongAnswer){ + auto result = QString{client.ReadRemainder()}.toStdString(); + EXPECT_THAT(result, Not(HasSubstr((wrongAnswer)))) << "Got an answer from the ClientNotifyModule even though we didnt want one with the given configuration"; }; auto client2 = LoginClient(); @@ -82,20 +83,20 @@ TEST_F(ZNCTest, ClientNotifyModule) { client.Write("PRIVMSG *clientnotify :NewNotifyOn clientid"); auto client5 = LoginClient("identifier123"); - client.ReadUntil(":Another client (identifier123) authenticated as your user. Use the 'ListClients' command to see all 5 clients."); + client.ReadUntil(":Another client (127.0.0.1 / identifier123) authenticated as your user. Use the 'ListClients' command to see all 5 clients."); auto client6 = LoginClient("identifier123"); - check_not_sent(client, ":Another client (identifier123) authenticated as your user. Use the 'ListClients' command to see all 6 clients."); + check_not_sent(client, ":Another client (127.0.0.1 / identifier123) authenticated as your user. Use the 'ListClients' command to see all 6 clients."); auto client7 = LoginClient("not_identifier123"); - client.ReadUntil(":Another client (not_identifier123) authenticated as your user. Use the 'ListClients' command to see all 7 clients."); + client.ReadUntil(":Another client (127.0.0.1 / not_identifier123) authenticated as your user. Use the 'ListClients' command to see all 7 clients."); // choose to notify from both clientids and new IPs client.Write("PRIVMSG *clientnotify :NewNotifyOn both"); auto client8 = LoginClient(); - check_not_sent(client, ":Another client (127.0.0.1) authenticated as your user. Use the 'ListClients' command to see all 8 clients."); + check_not_sent(client, ":Another client (127.0.0.1 / identifier123) authenticated as your user. Use the 'ListClients' command to see all 8 clients."); auto client9 = LoginClient("definitely_not_identifier123"); - client.ReadUntil(":Another client (definitely_not_identifier123) authenticated as your user. Use the 'ListClients' command to see all 9 clients."); + client.ReadUntil(":Another client (127.0.0.1 / definitely_not_identifier123) authenticated as your user. Use the 'ListClients' command to see all 9 clients."); } TEST_F(ZNCTest, ShellModule) { From 876b3d4151005871431de8e2e1937e4adf1fa23f Mon Sep 17 00:00:00 2001 From: Christian Heusel Date: Thu, 17 Nov 2022 18:30:16 +0100 Subject: [PATCH 5/7] split up the option into two separate ones --- modules/clientnotify.cpp | 54 +++++++++++++++++------------- test/integration/tests/modules.cpp | 4 +-- 2 files changed, 32 insertions(+), 26 deletions(-) diff --git a/modules/clientnotify.cpp b/modules/clientnotify.cpp index bb1560be..e9a96796 100644 --- a/modules/clientnotify.cpp +++ b/modules/clientnotify.cpp @@ -22,7 +22,7 @@ using std::set; class CClientNotifyMod : public CModule { protected: CString m_sMethod; - CString m_sNewNotifyOn; + bool m_bNewOnly{}; bool m_bOnDisconnect{}; bool m_bNotifyOnNewIP{}; @@ -34,7 +34,8 @@ class CClientNotifyMod : public CModule { void SaveSettings() { SetNV("method", m_sMethod); SetNV("newonly", m_bNewOnly ? "1" : "0"); - SetNV("newnotifyon", m_sNewNotifyOn); + SetNV("notifyonnewip", m_bNotifyOnNewIP ? "1" : "0"); + SetNV("notifyonnewclientid", m_bNotifyOnNewClientID ? "1" : "0"); SetNV("ondisconnect", m_bOnDisconnect ? "1" : "0"); } @@ -55,9 +56,12 @@ class CClientNotifyMod : public CModule { AddCommand("NewOnly", t_d(""), t_d("Turns notifications for unseen connections on or off"), [=](const CString& sLine) { OnNewOnlyCommand(sLine); }); - AddCommand("NewNotifyOn", t_d(""), - t_d("Specifies whether you want to be notified about new connections with new IPs, new ClientIDs connecting or in bot cases"), - [=](const CString& sLine) { OnNewNotifyOn(sLine); }); + AddCommand("NotifyOnNewIP", t_d(""), + t_d("Specifies whether you want to be notified about new connections with new IPs"), + [=](const CString& sLine) { OnNotifyOnNewIP(sLine); }); + AddCommand("NotifyOnNewID", t_d(""), + t_d("Specifies whether you want to be notified about new connections with new IDs"), + [=](const CString& sLine) { OnNotifyOnNewID(sLine); }); AddCommand( "OnDisconnect", t_d(""), t_d("Turns notifications for clients disconnecting on or off"), @@ -74,13 +78,10 @@ class CClientNotifyMod : public CModule { m_sMethod = "message"; } - if (m_sNewNotifyOn != "ip" && m_sNewNotifyOn != "clientid" && - m_sNewNotifyOn != "both") { - m_sNewNotifyOn = "ip"; - } - // default = off for these: + m_bNotifyOnNewIP = (GetNV("notifyonnewip") == "1"); + m_bNotifyOnNewClientID = (GetNV("notifyonnewclientid") == "1"); m_bNewOnly = (GetNV("newonly") == "1"); m_bOnDisconnect = (GetNV("ondisconnect") == "1"); @@ -159,24 +160,28 @@ class CClientNotifyMod : public CModule { PutModule(t_s("Saved.")); } - void OnNewNotifyOn(const CString& sCommand) { + void OnNotifyOnNewIP(const CString& sCommand) { const CString sArg = sCommand.Token(1, true).AsLower(); - if (sArg != "ip" && sArg != "clientid" && sArg != "both") { - PutModule(t_s("Usage: NewNotifyOn ")); + if (sArg.empty()) { + PutModule(t_s("Usage: NotifyOnNewIP ")); return; } - if (sArg == "both") { - m_bNotifyOnNewIP = true; - m_bNotifyOnNewClientID = true; - } else if (sArg == "ip") { - m_bNotifyOnNewIP = true; - } else if (sArg == "clientid") { - m_bNotifyOnNewClientID = true; + m_bNotifyOnNewIP = sArg.ToBool(); + SaveSettings(); + PutModule(t_s("Saved.")); + } + + void OnNotifyOnNewID(const CString& sCommand) { + const CString sArg = sCommand.Token(1, true).AsLower(); + + if (sArg.empty()) { + PutModule(t_s("Usage: NotifyOnNewID ")); + return; } - m_sNewNotifyOn = sArg; + m_bNotifyOnNewClientID = sArg.ToBool(); SaveSettings(); PutModule(t_s("Saved.")); } @@ -196,9 +201,10 @@ class CClientNotifyMod : public CModule { void OnShowCommand(const CString& sLine) { PutModule( - t_f("Current settings: Method: {1}, for unseen only: " - "{2}, unseen notify method: {3}, notify on disconnecting clients: {4}")( - m_sMethod, m_bNewOnly, m_sNewNotifyOn, m_bOnDisconnect)); + t_f("Current settings: Method: {1}, for unseen only: {2}, notify" + "for unseen IPs: {3}, notify for unseen IDs: {4}, notify on" + "disconnecting clients: {5}")( + m_sMethod, m_bNewOnly, m_bNotifyOnNewIP, m_bNotifyOnNewClientID, m_bOnDisconnect)); } }; diff --git a/test/integration/tests/modules.cpp b/test/integration/tests/modules.cpp index 3c19824b..d7b387c6 100644 --- a/test/integration/tests/modules.cpp +++ b/test/integration/tests/modules.cpp @@ -80,7 +80,7 @@ TEST_F(ZNCTest, ClientNotifyModule) { check_not_sent(client, ":Another client (127.0.0.1) authenticated as your user. Use the 'ListClients' command to see all 4 clients."); // choose to notify only on new client ids - client.Write("PRIVMSG *clientnotify :NewNotifyOn clientid"); + client.Write("PRIVMSG *clientnotify :NotifyOnNewID on"); auto client5 = LoginClient("identifier123"); client.ReadUntil(":Another client (127.0.0.1 / identifier123) authenticated as your user. Use the 'ListClients' command to see all 5 clients."); @@ -91,7 +91,7 @@ TEST_F(ZNCTest, ClientNotifyModule) { client.ReadUntil(":Another client (127.0.0.1 / not_identifier123) authenticated as your user. Use the 'ListClients' command to see all 7 clients."); // choose to notify from both clientids and new IPs - client.Write("PRIVMSG *clientnotify :NewNotifyOn both"); + client.Write("PRIVMSG *clientnotify :NotifyOnNewIP on"); auto client8 = LoginClient(); check_not_sent(client, ":Another client (127.0.0.1 / identifier123) authenticated as your user. Use the 'ListClients' command to see all 8 clients."); From 5eb2be278d91851a9c8cb9be276eb838aca2745e Mon Sep 17 00:00:00 2001 From: Christian Heusel Date: Thu, 17 Nov 2022 18:35:34 +0100 Subject: [PATCH 6/7] formatting commit clang-format --style=file -i test/ModulesTest.cpp --- modules/clientnotify.cpp | 37 ++++++++++++++++++++++--------------- 1 file changed, 22 insertions(+), 15 deletions(-) diff --git a/modules/clientnotify.cpp b/modules/clientnotify.cpp index e9a96796..b4d17488 100644 --- a/modules/clientnotify.cpp +++ b/modules/clientnotify.cpp @@ -14,8 +14,8 @@ * limitations under the License. */ -#include #include +#include using std::set; @@ -57,10 +57,12 @@ class CClientNotifyMod : public CModule { t_d("Turns notifications for unseen connections on or off"), [=](const CString& sLine) { OnNewOnlyCommand(sLine); }); AddCommand("NotifyOnNewIP", t_d(""), - t_d("Specifies whether you want to be notified about new connections with new IPs"), + t_d("Specifies whether you want to be notified about new " + "connections with new IPs"), [=](const CString& sLine) { OnNotifyOnNewIP(sLine); }); AddCommand("NotifyOnNewID", t_d(""), - t_d("Specifies whether you want to be notified about new connections with new IDs"), + t_d("Specifies whether you want to be notified about new " + "connections with new IDs"), [=](const CString& sLine) { OnNotifyOnNewID(sLine); }); AddCommand( "OnDisconnect", t_d(""), @@ -98,23 +100,27 @@ class CClientNotifyMod : public CModule { } auto sendLoginNotification = [&]() { - SendNotification(t_p("", - "Another client ({1}) authenticated as your user. " - "Use the 'ListClients' command to see all {2} " - "clients.", - GetUser()->GetAllClients().size())( - sClientNameMessage, GetUser()->GetAllClients().size())); + SendNotification( + t_p("", + "Another client ({1}) authenticated as your user. " + "Use the 'ListClients' command to see all {2} " + "clients.", + GetUser()->GetAllClients().size())( + sClientNameMessage, GetUser()->GetAllClients().size())); }; if (m_bNewOnly) { // see if we actually got a new client - // TODO: replace setName.find(...) == setName.end() with !setName.contains() once ZNC uses C++20 - if ((m_bNotifyOnNewIP && (m_sClientsSeenIP.find(sRemoteIP) == m_sClientsSeenIP.end())) || - (m_bNotifyOnNewClientID && (m_sClientsSeenID.find(sRemoteClientID) == m_sClientsSeenID.end()))) { + // TODO: replace setName.find(...) == setName.end() with + // !setName.contains() once ZNC uses C++20 + if ((m_bNotifyOnNewIP && (m_sClientsSeenIP.find(sRemoteIP) == + m_sClientsSeenIP.end())) || + (m_bNotifyOnNewClientID && + (m_sClientsSeenID.find(sRemoteClientID) == + m_sClientsSeenID.end()))) { sendLoginNotification(); } - } - else { + } else { sendLoginNotification(); } @@ -204,7 +210,8 @@ class CClientNotifyMod : public CModule { t_f("Current settings: Method: {1}, for unseen only: {2}, notify" "for unseen IPs: {3}, notify for unseen IDs: {4}, notify on" "disconnecting clients: {5}")( - m_sMethod, m_bNewOnly, m_bNotifyOnNewIP, m_bNotifyOnNewClientID, m_bOnDisconnect)); + m_sMethod, m_bNewOnly, m_bNotifyOnNewIP, m_bNotifyOnNewClientID, + m_bOnDisconnect)); } }; From da314683099dad3db071cf2bbf7206915d74a28c Mon Sep 17 00:00:00 2001 From: Alexey Sokolov Date: Thu, 24 Nov 2022 20:02:36 +0000 Subject: [PATCH 7/7] Update message in clientnotify to tell what ID is that See #1843 --- modules/clientnotify.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/clientnotify.cpp b/modules/clientnotify.cpp index b4d17488..e982f2f1 100644 --- a/modules/clientnotify.cpp +++ b/modules/clientnotify.cpp @@ -62,7 +62,7 @@ class CClientNotifyMod : public CModule { [=](const CString& sLine) { OnNotifyOnNewIP(sLine); }); AddCommand("NotifyOnNewID", t_d(""), t_d("Specifies whether you want to be notified about new " - "connections with new IDs"), + "connections with new client IDs"), [=](const CString& sLine) { OnNotifyOnNewID(sLine); }); AddCommand( "OnDisconnect", t_d(""),