diff --git a/actions/__init__.py b/actions/__init__.py index 155ea41..0f2a090 100644 --- a/actions/__init__.py +++ b/actions/__init__.py @@ -52,7 +52,7 @@ actions = [ }, { "type": "response", - "pattern": "/hm+/", + "pattern": "/.^[^!]*hm+/", "callback": score_word("hmm", "hm+") }, { @@ -67,7 +67,7 @@ actions = [ }, { "type": "response", - "pattern": "/o+f/", + "pattern": "/^[^!]*o+f/", "callback": score_word("oof", "o+f") }, { diff --git a/actions/stupid.py b/actions/stupid.py index 0658f08..0bc3484 100644 --- a/actions/stupid.py +++ b/actions/stupid.py @@ -9,7 +9,7 @@ def score_word(word, regex): check = response.lower().strip() botnick = self.bot.botnick - pattern = re.compile(regex)#"hm+") + pattern = re.compile(regex) matches = re.findall(pattern, check) maximum = 10 score = len(matches) if len(matches) <= maximum else maximum