From 8d3afdb00de14168569c6a28008db9fbcae9954d Mon Sep 17 00:00:00 2001 From: mrhanky Date: Thu, 6 Jul 2017 14:40:48 +0200 Subject: [PATCH] Fixed .jn command and added todo for wrong mcmaniac regex --- nxy/plugins/mcmaniac.py | 1 + nxy/plugins/useless.py | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/nxy/plugins/mcmaniac.py b/nxy/plugins/mcmaniac.py index 641688e..6d0f690 100644 --- a/nxy/plugins/mcmaniac.py +++ b/nxy/plugins/mcmaniac.py @@ -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\S+) PRIVMSG \S+ :.*(?PMc\S+iaC).*') def save(self, mask: str, item: str): if IrcString(mask).nick != self.bot.nick: diff --git a/nxy/plugins/useless.py b/nxy/plugins/useless.py index 9dd0f04..18c44c4 100644 --- a/nxy/plugins/useless.py +++ b/nxy/plugins/useless.py @@ -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 + %%jn ... %%jn """ choice = random.choice(['3Ja', '4Nein'])