I have been trying to make a trigger that will add someone to my auto rescue list and then tell the group that they have been added. Unfortunately i do not know much about scripting and have spent the last couple hours cruising the forums to try to figure this out.
So far I have made 2 triggers.
<triggers>
<trigger
enabled="y"
ignore_case="y"
match="^(.*?) tells the group \'add me\'$"
regexp="y"
sequence="100"
>
<send>; |br|%1 |n|has been added to |by|autorescue</send>
</trigger>
</triggers>
That one works. All it does is auto respond the the group saying that I have added them to autorescue. (the |br| and |by| are colors.
the next one is:
<triggers>
<trigger
enabled="y"
expand_variables="y"
ignore_case="y"
keep_evaluating="y"
match="^(.*?) tells the group \'add me\'$"
regexp="y"
send_to="9"
sequence="100"
variable="group"
>
<send>|%1</send>
</trigger>
</triggers>
This changes the variable... but instead of adding someone it just replaces what I already have.
For example:
John tells the group 'add me'
the variable changes to |John
This is also is a problem since the first name should not have a | (divider symbol) in front of it. I can simply manually add a name at the beginning, but that defeats the purpose of having a trigger in the first place.
Moving on:
Frank tells the group 'add me'
variable changes to |Frank instead of John|Frank
So far I have made 2 triggers.
<triggers>
<trigger
enabled="y"
ignore_case="y"
match="^(.*?) tells the group \'add me\'$"
regexp="y"
sequence="100"
>
<send>; |br|%1 |n|has been added to |by|autorescue</send>
</trigger>
</triggers>
That one works. All it does is auto respond the the group saying that I have added them to autorescue. (the |br| and |by| are colors.
the next one is:
<triggers>
<trigger
enabled="y"
expand_variables="y"
ignore_case="y"
keep_evaluating="y"
match="^(.*?) tells the group \'add me\'$"
regexp="y"
send_to="9"
sequence="100"
variable="group"
>
<send>|%1</send>
</trigger>
</triggers>
This changes the variable... but instead of adding someone it just replaces what I already have.
For example:
John tells the group 'add me'
the variable changes to |John
This is also is a problem since the first name should not have a | (divider symbol) in front of it. I can simply manually add a name at the beginning, but that defeats the purpose of having a trigger in the first place.
Moving on:
Frank tells the group 'add me'
variable changes to |Frank instead of John|Frank