diff --git a/sopel_SpiceBot_Core_Prerun/__init__.py b/sopel_SpiceBot_Core_Prerun/__init__.py index f619dcb..8b9a9d1 100644 --- a/sopel_SpiceBot_Core_Prerun/__init__.py +++ b/sopel_SpiceBot_Core_Prerun/__init__.py @@ -16,16 +16,20 @@ def prerun(): # Since there was more than one command, # we are going to redispatch commands # This will give sopel the appearance of recieving individual commands - print(comrun.commands) - if len(comrun.commands) > 1: - if comrun.is_rulematch: - if not comrun.is_real_command: + if comrun.is_multi_command: + if len(comrun.commands) > 1: + + # Handling for first command in series + if comrun.is_rulematch: + if not comrun.is_real_command: + sb.commands.dispatch(comrun.command) + else: sb.commands.dispatch(comrun.command) - else: - sb.commands.dispatch(comrun.command) - for trigger_dict in comrun.commands[1:]: - sb.commands.dispatch(trigger_dict) - return + + # All other commands + for trigger_dict in comrun.commands[1:]: + sb.commands.dispatch(trigger_dict) + return # If the original trigger is not the same after && or | split # so we will now redispatch to help get the correct function passed