Fixed .jn command and added todo for wrong mcmaniac regex
This commit is contained in:
parent
c941b43109
commit
8d3afdb00d
|
@ -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:
|
||||
|
|
|
@ -104,7 +104,7 @@ class Useless(DatabasePlugin):
|
|||
users (nick, waifu)
|
||||
values
|
||||
(%s, %s)
|
||||
on conflict (nick) do update set
|
||||
on conflict (nick) do update set
|
||||
waifu = excluded.waifu
|
||||
''', [mask.nick, waifu])
|
||||
|
||||
|
@ -142,7 +142,7 @@ class Useless(DatabasePlugin):
|
|||
users (nick, husbando)
|
||||
values
|
||||
(%s, %s)
|
||||
on conflict (nick) do update set
|
||||
on conflict (nick) do update set
|
||||
husbando = excluded.husbando
|
||||
''', [mask.nick, nick])
|
||||
|
||||
|
@ -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'])
|
||||
|
|
Loading…
Reference in New Issue
Block a user