diff options
author | jomo <github@jomo.tv> | 2014-08-07 01:17:26 +0200 |
---|---|---|
committer | jomo <github@jomo.tv> | 2014-08-07 01:17:26 +0200 |
commit | 9404f91e913d16ec7473af05b0042c148218ea52 (patch) | |
tree | a39172c35ab7db44f15690ae5cf65dc6c27c1c60 /mentio.py | |
parent | 6e65173c4a7dd50480ab501d190c5478644aa836 (diff) |
keyword must be IN the word, not exaclty the word
Diffstat (limited to 'mentio.py')
-rw-r--r-- | mentio.py | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -33,8 +33,9 @@ def onChat(event): for index, word in enumerate(rec_words): isMentioned = False - if word.lower() in keywords: # is the word in the keywords list - isMentioned = True + for keyword in keywords: + if keyword in word.lower(): # is the keyword mentioned + isMentioned = True if isMentioned: # join all color codes used upto this word |