Respond to bare "+1"s again

This commit is contained in:
Joscha 2018-08-11 12:39:13 +00:00
parent 4fa65f1e5f
commit cc594578b7

View file

@ -58,7 +58,7 @@ class PlusOne:
) )
AUTHOR = "Created by @Garmy using github.com/Garmelon/yaboli\n" 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+)" MENTION_RE = r"(to\s+@?|@)(\S+)"
def __init__(self, dbfile): def __init__(self, dbfile):
@ -87,7 +87,7 @@ class PlusOne:
@yaboli.trigger(PLUSONE_RE, flags=re.IGNORECASE) @yaboli.trigger(PLUSONE_RE, flags=re.IGNORECASE)
async def trigger_plusone(self, room, message, match): 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 nick = None
if specific: if specific: