From: Kyle Fuller Date: Thu, 14 Mar 2013 07:43:32 +0000 (+0000) Subject: Correctly handle mention keywords X-Git-Tag: 1.0.0~33 X-Git-Url: http://git.99rst.org/?a=commitdiff_plain;h=23b414b2c65169e1f1452f7a93ad84cf9aaeedc9;p=znc-palaver.git Correctly handle mention keywords --- diff --git a/palaver.cpp b/palaver.cpp index 9723697..c41747f 100644 --- a/palaver.cpp +++ b/palaver.cpp @@ -256,12 +256,12 @@ public: it != m_vMentionKeywords.end(); ++it) { const CString& sKeyword = *it; - if (sKeyword.Equals("{nick}") && sMessage.WildCmp("*" + sNick + "*")) { + if (sKeyword.Equals("{nick}") && sMessage.find(sNick) != std::string::npos) { bResult = true; break; } - if (sMessage.WildCmp("*" + sKeyword + "*")) { + if (sMessage.find(sKeyword) != std::string::npos) { bResult = true; break; } @@ -277,7 +277,7 @@ public: it != m_vIgnoreKeywords.end(); ++it) { const CString& sKeyword = *it; - if (sMessage.WildCmp("*" + sKeyword + "*")) { + if (sMessage.find(sKeyword) != std::string::npos) { bResult = true; break; }