From: Kyle Fuller Date: Tue, 5 Jul 2016 19:50:10 +0000 (+0100) Subject: Only send NOTICEs after 001 (authenticated) X-Git-Tag: 1.1.0~7^2 X-Git-Url: http://git.99rst.org/?a=commitdiff_plain;h=d9aff6bce72bcf38775fafe26043b28c08338b05;p=znc-palaver.git Only send NOTICEs after 001 (authenticated) --- diff --git a/palaver.cpp b/palaver.cpp index 8ffdd33..05dd5c8 100644 --- a/palaver.cpp +++ b/palaver.cpp @@ -18,6 +18,7 @@ #include #include #include +#include #if defined VERSION_MAJOR && defined VERSION_MINOR && VERSION_MAJOR >= 1 && VERSION_MINOR >= 5 #define HAS_REGEX @@ -1081,7 +1082,16 @@ public: } virtual EModRet OnPrivNotice(CNick& Nick, CString& sMessage) { - ParseMessage(Nick, sMessage, NULL); + const auto network = GetNetwork(); + + if (network) { + const auto sock = network->GetIRCSock(); + + if (sock && sock->IsAuthed()) { + ParseMessage(Nick, sMessage, NULL); + } + } + return CONTINUE; }