keyword must be IN the word, not exaclty the word

This commit is contained in:
jomo
2014-08-07 01:17:26 +02:00
parent 881c413642
commit 2d5d6aace0
+2 -1
View File
@@ -33,7 +33,8 @@ def onChat(event):
for index, word in enumerate(rec_words): for index, word in enumerate(rec_words):
isMentioned = False isMentioned = False
if word.lower() in keywords: # is the word in the keywords list for keyword in keywords:
if keyword in word.lower(): # is the keyword mentioned
isMentioned = True isMentioned = True
if isMentioned: if isMentioned: