From 6772fbc53bb80fa1311b2d0ee7809f686e527af5 Mon Sep 17 00:00:00 2001 From: deathbybandaid Date: Mon, 13 May 2019 16:26:49 -0400 Subject: [PATCH] better sifting --- sopel_modules/SpiceBot_CommandsQuery/CommandsQuery.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/sopel_modules/SpiceBot_CommandsQuery/CommandsQuery.py b/sopel_modules/SpiceBot_CommandsQuery/CommandsQuery.py index 31ac4ed..9651618 100644 --- a/sopel_modules/SpiceBot_CommandsQuery/CommandsQuery.py +++ b/sopel_modules/SpiceBot_CommandsQuery/CommandsQuery.py @@ -117,9 +117,10 @@ def setup(bot): validcoms = list(validcoms) else: validcoms = [validcoms] - if "(.*)" in validcoms: - while "(.*)" in validcoms: - validcoms.remove("(.*)") + for regexcom in ["(.*)", '^\?(.*)']: + if regexcom in validcoms: + while regexcom in validcoms: + validcoms.remove(regexcom) if len(validcoms): validcomdict = {"comtype": comtype, "validcoms": validcoms}