Simplified mcmaniac event

This commit is contained in:
mrhanky 2017-05-30 16:13:20 +02:00
parent e7a6501c7d
commit 2dd9289ffd
No known key found for this signature in database
GPG Key ID: 67D772C481CB41B8

View File

@ -42,9 +42,7 @@ class McManiac(DatabasePlugin):
if result: if result:
return '[{idx}/{len}] {item}'.format(**result) return '[{idx}/{len}] {item}'.format(**result)
@irc3.event(r'(?i)^:(?P<mask>\S+) PRIVMSG \S+ :' @irc3.event(r'(?i)^:(?P<mask>\S+) PRIVMSG \S+ :.*(?P<item>Mc\S+iaC).*')
r'(?P<msg>.*(?P<item>Mc\S+iaC).*)') def save(self, mask: str, item: str):
def save(self, mask: str, msg: str, item: str): if IrcString(mask).nick != self.bot.nick:
nick = IrcString(mask).nick
if nick != self.bot.nick and msg != '.reload mcmaniac':
self._insert(item=item) self._insert(item=item)