From cc594578b7f93756dee6271b7bb97eebb11f512f Mon Sep 17 00:00:00 2001 From: Joscha Date: Sat, 11 Aug 2018 12:39:13 +0000 Subject: [PATCH] Respond to bare "+1"s again --- plusone.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plusone.py b/plusone.py index d8d83c0..fbba001 100644 --- a/plusone.py +++ b/plusone.py @@ -58,7 +58,7 @@ class PlusOne: ) AUTHOR = "Created by @Garmy using github.com/Garmelon/yaboli\n" - PLUSONE_RE = r"\s*(\+1|:\+1:|:bronze(!\?|\?!)?:)\s+(.*)" + PLUSONE_RE = r"\s*(\+1|:\+1:|:bronze(!\?|\?!)?:)(\s+(.*))?" MENTION_RE = r"(to\s+@?|@)(\S+)" def __init__(self, dbfile): @@ -87,7 +87,7 @@ class PlusOne: @yaboli.trigger(PLUSONE_RE, flags=re.IGNORECASE) async def trigger_plusone(self, room, message, match): - specific = re.match(self.MENTION_RE, match.group(3)) + specific = re.match(self.MENTION_RE, match.group(4)) nick = None if specific: