From 2d5d6aace0484ae6c840b40b3afa68302a046c4b Mon Sep 17 00:00:00 2001 From: jomo Date: Thu, 7 Aug 2014 01:17:26 +0200 Subject: [PATCH] keyword must be IN the word, not exaclty the word --- mentio.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/mentio.py b/mentio.py index 003fa63..df876d5 100644 --- a/mentio.py +++ b/mentio.py @@ -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