From 36cfb11d619ece3baafdb16c3312c1aaab87eab3 Mon Sep 17 00:00:00 2001 From: deathbybandaid Date: Thu, 23 May 2019 19:56:56 -0400 Subject: [PATCH] test --- sopel_modules/SpiceBot/Prerun.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/sopel_modules/SpiceBot/Prerun.py b/sopel_modules/SpiceBot/Prerun.py index f4c67d6..51e8ba1 100644 --- a/sopel_modules/SpiceBot/Prerun.py +++ b/sopel_modules/SpiceBot/Prerun.py @@ -65,10 +65,14 @@ class BotPrerun(): # Run the function for all splits for argsdict in argsdict_list: - # check if anything prohibits the nick from running the command - if self.trigger_runstatus(bot, trigger, argsdict_list[0]): - trigger.sb = argsdict - function(bot, trigger, *args, **kwargs) + trigger.sb = argsdict + trigger.sb["args"], trigger.sb["hyphen_arg"] = self.trigger_hyphen_args(trigger.sb) + if trigger.sb["hyphen_arg"]: + return self.trigger_hyphen_arg_handler(bot, trigger, trigger.sb) + else: + # check if anything prohibits the nick from running the command + if self.trigger_runstatus(bot, trigger, argsdict_list[0]): + function(bot, trigger, *args, **kwargs) return return internal_prerun return actual_decorator