From ef6b4e1c3ac5ac23013889c2085e59124cfc2544 Mon Sep 17 00:00:00 2001 From: deathbybandaid Date: Thu, 23 May 2019 18:54:24 -0400 Subject: [PATCH] test with removal of jobs --- sopel_modules/SpiceBot/Prerun.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/sopel_modules/SpiceBot/Prerun.py b/sopel_modules/SpiceBot/Prerun.py index f37c7f4..b97c971 100644 --- a/sopel_modules/SpiceBot/Prerun.py +++ b/sopel_modules/SpiceBot/Prerun.py @@ -52,15 +52,16 @@ class BotPrerun(): argsdict_list = self.argsdict_list(argsdict_default, and_split) # Run the function for all splits - for argsdict in argsdict_list: + while len(argsdict_list): - if argsdict["hyphen_arg"]: - self.hyphen_arg_handler(bot, trigger, argsdict) + if argsdict_list[0]["hyphen_arg"]: + self.hyphen_arg_handler(bot, trigger, argsdict_list[0]) # check if anything prohibits the nick from running the command - if self.runstatus(bot, trigger, argsdict): - trigger.sb = argsdict + if self.runstatus(bot, trigger, argsdict_list[0]): + trigger.sb = argsdict_list[0] function(bot, trigger, *args, **kwargs) + del argsdict_list[0] return return internal_prerun return actual_decorator