mcmaniac: fix regex

This commit is contained in:
jkhsjdhjs 2020-12-19 15:20:30 +00:00
parent 22f4cc8d32
commit 51bf31e2a5

View File

@ -50,7 +50,7 @@ class McManiac(DatabasePlugin):
return '[{rank}/{total}] {item}'.format(**result)
# TODO: fix regex ("McFooiaC McBariaC" adds "Mc\S+iaC")
@irc3.event(r'^:(?P<mask>\S+) PRIVMSG \S+ :.*(?P<item>Mc\S+iaC).*')
@irc3.event(r'^:(?P<mask>\S+) PRIVMSG \S+ :.*?(?P<item>Mc\S+iaC).*')
def save(self, mask: str, item: str):
if IrcString(mask).nick != self.bot.nick:
with self.con.cursor() as cur: