Don't match on {nick}
authorKyle Fuller <redacted>
Sun, 16 Jun 2013 10:42:01 +0000 (11:42 +0100)
committerKyle Fuller <redacted>
Sun, 16 Jun 2013 10:42:01 +0000 (11:42 +0100)
palaver.cpp

index 3f85379bce322ad783b3cb8ecd84d248ee61d435..1dcc2057cb036134378f50f5bc81eac6082c86fd 100644 (file)
@@ -256,12 +256,12 @@ public:
                                it != m_vMentionKeywords.end(); ++it) {
                        const CString& sKeyword = *it;
 
-                       if (sKeyword.Equals("{nick}") && sMessage.find(sNick) != std::string::npos) {
-                               bResult = true;
-                               break;
-                       }
-
-                       if (sMessage.find(sKeyword) != std::string::npos) {
+                       if (sKeyword.Equals("{nick}")) {
+                               if (sMessage.find(sNick) != std::string::npos) {
+                                       bResult = true;
+                                       break;
+                               }
+                       } else if (sMessage.find(sKeyword) != std::string::npos) {
                                bResult = true;
                                break;
                        }
git clone https://git.99rst.org/PROJECT