From 2968649e16caf9415906e88eb6ffadd99e0c3c7a Mon Sep 17 00:00:00 2001 From: deathbybandaid Date: Fri, 24 May 2019 12:13:48 -0400 Subject: [PATCH] test this logic --- sopel_modules/SpiceBot/Prerun.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/sopel_modules/SpiceBot/Prerun.py b/sopel_modules/SpiceBot/Prerun.py index 15807c5..3ed5bca 100644 --- a/sopel_modules/SpiceBot/Prerun.py +++ b/sopel_modules/SpiceBot/Prerun.py @@ -106,11 +106,14 @@ class BotPrerun(): reason = disabled_list[trigger.sb["realcom"]]["reason"] timestamp = disabled_list[trigger.sb["realcom"]]["timestamp"] bywhom = disabled_list[trigger.sb["realcom"]]["disabledby"] - return self.trigger_cant_run(bot, trigger, "The " + str(trigger.sb["com"]) + " command was disabled by " + bywhom + " in " + str(trigger.sender) + " at " + str(timestamp) + " for the following reason: " + str(reason)) + bot.notice("The " + str(trigger.sb["com"]) + " command was disabled by " + bywhom + " in " + str(trigger.sender) + " at " + str(timestamp) + " for the following reason: " + str(reason), trigger.nick) + if command_permissions_check(bot, trigger, ['admins', 'owner', 'OP', 'ADMIN', 'OWNER']): + bot.notice("You however are authorized to bypass this warning with the (-a) admin switch.", trigger.nick) + return False return True - def trigger_cant_run(self, bot, trigger, message=None): + def trigger_cant_run(bot, trigger, message=None): if message: bot.notice(message, trigger.nick) if command_permissions_check(bot, trigger, ['admins', 'owner', 'OP', 'ADMIN', 'OWNER']):