test
This commit is contained in:
parent
0166950b7a
commit
e9df0721a2
@ -149,7 +149,7 @@ class Commands():
|
|||||||
elif trigger_dict["trigger_type"] == "action_command":
|
elif trigger_dict["trigger_type"] == "action_command":
|
||||||
commands_list = self.valid_sopel_action_commands
|
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):
|
def is_catchall(self, function, command_type):
|
||||||
"""Determine if function could be called with a rule match"""
|
"""Determine if function could be called with a rule match"""
|
||||||
|
|||||||
@ -89,25 +89,29 @@ def rebuild_pipes(commands, trigger_str_add=None):
|
|||||||
repipe_trigger_dict["trigger_str"] += " %s" % trigger_str_add
|
repipe_trigger_dict["trigger_str"] += " %s" % trigger_str_add
|
||||||
next_index_value = 2
|
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":
|
if trigger_dict["trigger_type"] == "command":
|
||||||
repipe_trigger_dict["trigger_str"] += " %s %s%s %s" % (sb.commands.pipe_split_key,
|
repipe_trigger_dict["trigger_str"] += " %s %s%s %s" % (sb.commands.pipe_split_key,
|
||||||
trigger_dict["trigger_prefix"],
|
trigger_dict["trigger_prefix"],
|
||||||
trigger_dict["trigger_command"],
|
trigger_dict["trigger_command"],
|
||||||
trigger_dict["trigger_str"])
|
trigger_dict["trigger_str"])
|
||||||
|
|
||||||
elif trigger_dict["trigger_type"] == "nickname_command":
|
elif trigger_dict["trigger_type"] == "nickname_command":
|
||||||
repipe_trigger_dict["trigger_str"] += " %s %s %s %s" % (sb.commands.pipe_split_key,
|
repipe_trigger_dict["trigger_str"] += " %s %s %s %s" % (sb.commands.pipe_split_key,
|
||||||
trigger_dict["trigger_prefix"],
|
trigger_dict["trigger_prefix"],
|
||||||
trigger_dict["trigger_command"],
|
trigger_dict["trigger_command"],
|
||||||
trigger_dict["trigger_str"])
|
trigger_dict["trigger_str"])
|
||||||
|
|
||||||
elif trigger_dict["trigger_type"] == "action_command":
|
elif trigger_dict["trigger_type"] == "action_command":
|
||||||
repipe_trigger_dict["trigger_str"] += " %s %s %s %s" % (sb.commands.pipe_split_key,
|
repipe_trigger_dict["trigger_str"] += " %s %s %s %s" % (sb.commands.pipe_split_key,
|
||||||
"/me",
|
"/me",
|
||||||
trigger_dict["trigger_command"],
|
trigger_dict["trigger_command"],
|
||||||
trigger_dict["trigger_str"])
|
trigger_dict["trigger_str"])
|
||||||
|
|
||||||
|
except IndexError:
|
||||||
|
repipe_trigger_dict = repipe_trigger_dict
|
||||||
|
|
||||||
return repipe_trigger_dict
|
return repipe_trigger_dict
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user