Compare commits

..

No commits in common. "0166950b7a24e0fdb793b2caedfef13c8cfb7318" and "a0edd673a8c06a02a1edf28e3f4e5c875af12416" have entirely different histories.

View File

@ -83,31 +83,37 @@ def rebuild_pipes(commands, trigger_str_add=None):
if not trigger_str_add:
repipe_trigger_dict = commands[0]
next_index_value = 1
else:
repipe_trigger_dict = commands[1]
repipe_trigger_dict["trigger_str"] += " %s" % trigger_str_add
next_index_value = 2
for trigger_dict in commands[next_index_value:]:
trigger_number = 1
for trigger_dict in commands[1:]:
trigger_str = trigger_dict["trigger_str"]
splitkey_str = " %s " % sb.commands.pipe_split_key
if trigger_str_add and trigger_number == 1:
trigger_str += " %s" % trigger_str_add
splitkey_str = ""
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" % (splitkey_str,
trigger_dict["trigger_prefix"],
trigger_dict["trigger_command"],
trigger_dict["trigger_str"])
trigger_str)
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" % (splitkey_str,
trigger_dict["trigger_prefix"],
trigger_dict["trigger_command"],
trigger_dict["trigger_str"])
trigger_str)
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" % (splitkey_str,
"/me",
trigger_dict["trigger_command"],
trigger_dict["trigger_str"])
trigger_str)
trigger_number += 1
return repipe_trigger_dict