From 941047900acea9c3f4bf2b5155b0ce1e377aff93 Mon Sep 17 00:00:00 2001 From: Christine Dodrill Date: Sun, 15 Nov 2015 19:55:21 -0800 Subject: [PATCH] question those in our ranks --- plugins/shitposting.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/plugins/shitposting.py b/plugins/shitposting.py index a13930b..25dddeb 100644 --- a/plugins/shitposting.py +++ b/plugins/shitposting.py @@ -4,13 +4,13 @@ from util import hook def skeltal(_): return "https://www.youtube.com/watch?v=10pqeNBg5d0" -@hook.regex(r"^([hH])(|[?!])$") +@hook.regex(r"^([hH])(|[?!]+)$") def h(inp, channel=None, conn=None): suff = "" - if inp.group(2) == "?": - suff = "!" - elif inp.group(2) == "!": - suff = "?" + if inp.group(2).startswith("?"): + suff = inp.group(2).replace("?", "!") + elif inp.group(2).startswith("!"): + suff = inp.group(2).replace("!", "?") return inp.group(1) + suff @hook.regex("dQw4w9WgXcQ")