Match mention keywords
authorKyle Fuller <redacted>
Thu, 14 Mar 2013 07:39:55 +0000 (07:39 +0000)
committerKyle Fuller <redacted>
Thu, 14 Mar 2013 09:28:49 +0000 (09:28 +0000)
palaver.cpp

index 72bfd9d381688b91bc5b52b3f381917b806d75c0..97236973f8ab5245b51d37ee0449de74dac381d9 100644 (file)
@@ -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.WildCmp("*" + sNick + "*")) {
                                bResult = true;
                                break;
                        }
 
-                       if (sMessage.WildCmp(sKeyword)) {
+                       if (sMessage.WildCmp("*" + sKeyword + "*")) {
                                bResult = true;
                                break;
                        }
@@ -277,7 +277,7 @@ public:
                                it != m_vIgnoreKeywords.end(); ++it) {
                        const CString& sKeyword = *it;
 
-                       if (sMessage.WildCmp(sKeyword)) {
+                       if (sMessage.WildCmp("*" + sKeyword + "*")) {
                                bResult = true;
                                break;
                        }
git clone https://git.99rst.org/PROJECT