Fixed .jn command and added todo for wrong mcmaniac regex

This commit is contained in:
mrhanky 2017-07-06 14:40:48 +02:00
parent c941b43109
commit 8d3afdb00d
No known key found for this signature in database
GPG Key ID: 67D772C481CB41B8
2 changed files with 4 additions and 3 deletions

View File

@ -54,6 +54,7 @@ class McManiac(DatabasePlugin):
if result:
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).*')
def save(self, mask: str, item: str):
if IrcString(mask).nick != self.bot.nick:

View File

@ -188,7 +188,7 @@ class Useless(DatabasePlugin):
def jn(self, mask: IrcString, target: IrcString, args: DocOptDict):
"""Decides between yes and no (for a question).
%%jn <question>
%%jn <question>...
%%jn
"""
choice = random.choice(['3Ja', '4Nein'])