diff --git a/modules/words.py b/modules/words.py index 160325ff..e5e1ff16 100644 --- a/modules/words.py +++ b/modules/words.py @@ -1,6 +1,8 @@ import time from src import EventManager, ModuleManager, utils +WORD_STOP = ";:,!?~" + class Module(ModuleManager.BaseModule): def _channel_message(self, user, event): words = list(filter(None, event["message_split"])) @@ -18,6 +20,7 @@ class Module(ModuleManager.BaseModule): tracked_words = set(event["server"].get_setting( "tracked-words", [])) for word in words: + word = word.rstrip(WORD_STOP) if word.lower() in tracked_words: setting = "word-%s" % word word_count = user.get_setting(setting, 0)