Simplified mcmaniac event
This commit is contained in:
parent
e7a6501c7d
commit
2dd9289ffd
|
@ -42,9 +42,7 @@ class McManiac(DatabasePlugin):
|
|||
if result:
|
||||
return '[{idx}/{len}] {item}'.format(**result)
|
||||
|
||||
@irc3.event(r'(?i)^:(?P<mask>\S+) PRIVMSG \S+ :'
|
||||
r'(?P<msg>.*(?P<item>Mc\S+iaC).*)')
|
||||
def save(self, mask: str, msg: str, item: str):
|
||||
nick = IrcString(mask).nick
|
||||
if nick != self.bot.nick and msg != '.reload mcmaniac':
|
||||
@irc3.event(r'(?i)^:(?P<mask>\S+) PRIVMSG \S+ :.*(?P<item>Mc\S+iaC).*')
|
||||
def save(self, mask: str, item: str):
|
||||
if IrcString(mask).nick != self.bot.nick:
|
||||
self._insert(item=item)
|
||||
|
|
Loading…
Reference in New Issue
Block a user