diff --git a/sopel_SpiceBot_Core_1/SBCore/commands/__init__.py b/sopel_SpiceBot_Core_1/SBCore/commands/__init__.py index e391888..18aa037 100644 --- a/sopel_SpiceBot_Core_1/SBCore/commands/__init__.py +++ b/sopel_SpiceBot_Core_1/SBCore/commands/__init__.py @@ -149,7 +149,7 @@ class Commands(): elif trigger_dict["trigger_type"] == "action_command": commands_list = self.valid_sopel_action_commands - return (trigger_dict["trigger_command"] in commands_list) + return (trigger_dict["trigger_command"].lower() in [x.lower() for x in commands_list]) def is_catchall(self, function, command_type): """Determine if function could be called with a rule match""" diff --git a/sopel_SpiceBot_Core_Prerun/__init__.py b/sopel_SpiceBot_Core_Prerun/__init__.py index 979606f..9225ea8 100644 --- a/sopel_SpiceBot_Core_Prerun/__init__.py +++ b/sopel_SpiceBot_Core_Prerun/__init__.py @@ -89,25 +89,29 @@ def rebuild_pipes(commands, trigger_str_add=None): repipe_trigger_dict["trigger_str"] += " %s" % trigger_str_add next_index_value = 2 - for trigger_dict in commands[next_index_value:]: + try: + for trigger_dict in commands[next_index_value:]: - if trigger_dict["trigger_type"] == "command": - repipe_trigger_dict["trigger_str"] += " %s %s%s %s" % (sb.commands.pipe_split_key, - trigger_dict["trigger_prefix"], - trigger_dict["trigger_command"], - trigger_dict["trigger_str"]) + if trigger_dict["trigger_type"] == "command": + repipe_trigger_dict["trigger_str"] += " %s %s%s %s" % (sb.commands.pipe_split_key, + trigger_dict["trigger_prefix"], + trigger_dict["trigger_command"], + trigger_dict["trigger_str"]) - elif trigger_dict["trigger_type"] == "nickname_command": - repipe_trigger_dict["trigger_str"] += " %s %s %s %s" % (sb.commands.pipe_split_key, - trigger_dict["trigger_prefix"], - trigger_dict["trigger_command"], - trigger_dict["trigger_str"]) + elif trigger_dict["trigger_type"] == "nickname_command": + repipe_trigger_dict["trigger_str"] += " %s %s %s %s" % (sb.commands.pipe_split_key, + trigger_dict["trigger_prefix"], + trigger_dict["trigger_command"], + trigger_dict["trigger_str"]) - elif trigger_dict["trigger_type"] == "action_command": - repipe_trigger_dict["trigger_str"] += " %s %s %s %s" % (sb.commands.pipe_split_key, - "/me", - trigger_dict["trigger_command"], - trigger_dict["trigger_str"]) + elif trigger_dict["trigger_type"] == "action_command": + repipe_trigger_dict["trigger_str"] += " %s %s %s %s" % (sb.commands.pipe_split_key, + "/me", + trigger_dict["trigger_command"], + trigger_dict["trigger_str"]) + + except IndexError: + repipe_trigger_dict = repipe_trigger_dict return repipe_trigger_dict