From 1471bdac0cd761b92fea29c2000928a93aaa7d38 Mon Sep 17 00:00:00 2001 From: deathbybandaid Date: Mon, 13 May 2019 10:08:37 -0400 Subject: [PATCH] attempt reversion --- Installation Files/requirements-os.sh | 3 +++ .../SpiceBot_CommandsQuery/QueryCommand.py | 15 +++++++-------- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/Installation Files/requirements-os.sh b/Installation Files/requirements-os.sh index 31f9763..0df25d2 100644 --- a/Installation Files/requirements-os.sh +++ b/Installation Files/requirements-os.sh @@ -39,6 +39,9 @@ mkdir /run/sopel echo $$ > /run/sopel/sopel-SpiceBotSERV.pid chmod -R 777 /run/sopel/ +apt install mysql-server libmysqlclient-dev -y +pip3 install mysql + cp /home/sopel/SpiceBot/System-Files/Config/SpiceBot.cfg /home/sopel/SpiceBot.cfg cp /home/sopel/SpiceBot/System-Files/systemd/SpiceBot.service /lib/systemd/system/SpiceBot.service diff --git a/sopel_modules/SpiceBot_CommandsQuery/QueryCommand.py b/sopel_modules/SpiceBot_CommandsQuery/QueryCommand.py index 6bbbc64..f8da999 100644 --- a/sopel_modules/SpiceBot_CommandsQuery/QueryCommand.py +++ b/sopel_modules/SpiceBot_CommandsQuery/QueryCommand.py @@ -21,13 +21,13 @@ def query_detection(bot, trigger): commands_list = dict() for commandstype in bot.memory['SpiceBot_CommandsQuery']['commands'].keys(): - if commandstype != 'rule': - for com in bot.memory['SpiceBot_CommandsQuery']['commands'][commandstype].keys(): - if com not in commands_list.keys(): - if commandstype == 'nickname': - commands_list[str(bot.nick) + " " + com] = bot.memory['SpiceBot_CommandsQuery']['commands'][commandstype][com] - else: - commands_list[com] = bot.memory['SpiceBot_CommandsQuery']['commands'][commandstype][com] + # if commandstype != 'rule': + for com in bot.memory['SpiceBot_CommandsQuery']['commands'][commandstype].keys(): + if com not in commands_list.keys(): + if commandstype == 'nickname': + commands_list[str(bot.nick) + " " + com] = bot.memory['SpiceBot_CommandsQuery']['commands'][commandstype][com] + else: + commands_list[com] = bot.memory['SpiceBot_CommandsQuery']['commands'][commandstype][com] triggerargsarray = spicemanip.main(trigger, 'create') @@ -79,7 +79,6 @@ def query_detection(bot, trigger): return elif not querycommand: - bot.say("no query command") return else: