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:
|
if result:
|
||||||
return '[{rank}/{total}] {item}'.format(**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).*')
|
@irc3.event(r'^:(?P<mask>\S+) PRIVMSG \S+ :.*(?P<item>Mc\S+iaC).*')
|
||||||
def save(self, mask: str, item: str):
|
def save(self, mask: str, item: str):
|
||||||
if IrcString(mask).nick != self.bot.nick:
|
if IrcString(mask).nick != self.bot.nick:
|
||||||
|
|
|
@ -104,7 +104,7 @@ class Useless(DatabasePlugin):
|
||||||
users (nick, waifu)
|
users (nick, waifu)
|
||||||
values
|
values
|
||||||
(%s, %s)
|
(%s, %s)
|
||||||
on conflict (nick) do update set
|
on conflict (nick) do update set
|
||||||
waifu = excluded.waifu
|
waifu = excluded.waifu
|
||||||
''', [mask.nick, waifu])
|
''', [mask.nick, waifu])
|
||||||
|
|
||||||
|
@ -142,7 +142,7 @@ class Useless(DatabasePlugin):
|
||||||
users (nick, husbando)
|
users (nick, husbando)
|
||||||
values
|
values
|
||||||
(%s, %s)
|
(%s, %s)
|
||||||
on conflict (nick) do update set
|
on conflict (nick) do update set
|
||||||
husbando = excluded.husbando
|
husbando = excluded.husbando
|
||||||
''', [mask.nick, nick])
|
''', [mask.nick, nick])
|
||||||
|
|
||||||
|
@ -188,7 +188,7 @@ class Useless(DatabasePlugin):
|
||||||
def jn(self, mask: IrcString, target: IrcString, args: DocOptDict):
|
def jn(self, mask: IrcString, target: IrcString, args: DocOptDict):
|
||||||
"""Decides between yes and no (for a question).
|
"""Decides between yes and no (for a question).
|
||||||
|
|
||||||
%%jn <question>
|
%%jn <question>...
|
||||||
%%jn
|
%%jn
|
||||||
"""
|
"""
|
||||||
choice = random.choice(['3Ja', '4Nein'])
|
choice = random.choice(['3Ja', '4Nein'])
|
||||||
|
|
Loading…
Reference in New Issue
Block a user