From: Kyle Fuller Date: Wed, 30 Sep 2015 23:10:49 +0000 (-0700) Subject: Allow nick matching if nick contains a word boundary X-Git-Tag: 1.1.0~14 X-Git-Url: http://git.99rst.org/?a=commitdiff_plain;h=0f7a59dda909934cf2abac03798938285497d242;p=znc-palaver.git Allow nick matching if nick contains a word boundary Fixes #30 --- diff --git a/palaver.cpp b/palaver.cpp index ebc8295..a578472 100644 --- a/palaver.cpp +++ b/palaver.cpp @@ -494,6 +494,14 @@ public: bResult = true; break; } + + // If that didn't match, and the keyword contains a word boundary + if (!bResult && (sKeyword.find("[") != std::string::npos || sKeyword.find("]") != std::string::npos)) { + if (sMessage.find(sKeyword) != std::string::npos) { + bResult = true; + break; + } + } #else if (sMessage.find(sKeyword) != std::string::npos) { bResult = true;