Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are
spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the
password reset link.
Due to spam on this forum, all posts now need moderator approval.
Entire forum
➜ MUSHclient
➜ General
➜ functional trigger doesn't work in plugin
functional trigger doesn't work in plugin
|
It is now over 60 days since the last post. This thread is closed.
Refresh page
Posted by
| Mahony
(27 posts) Bio
|
Date
| Wed 29 Oct 2014 07:11 PM (UTC) Amended on Wed 29 Oct 2014 07:46 PM (UTC) by Nick Gammon
|
Message
| Hi
I have a simple two-trigger plugin that I made exporting the triggers from world file where it works fine. The only thing I changed was re-arranging the "keywords" in the trigger header (enable, group, match,...)
Here it is
<triggers>
<trigger
custom_colour="17"
enabled="y"
expand_variables="y"
group="qcolor"
ignore_case="y"
keep_evaluating="y"
match="@q_name"
regexp="y"
sequence="100"
other_text_colour="saddlebrown"
other_back_colour="yellow"
>
</trigger>
<trigger
enabled="y"
group="qcolor"
match="Seek (.*?) out somewhere in the vicinity\'$"
regexp="y"
send_to="9"
sequence="100"
variable="q_name"
>
<send>%1
</send>
</trigger>
</triggers>
The first triger works fine. It fills the variable q_name. But the second doesn't work. I removed the plugin and recreated the triggers back to world file and it works fain again. But not in the plugin. Where is the difference?
Thanks for explaining
Mahony
[EDIT] Layed out triggers more readably. - Nick Gammon | Top |
|
Posted by
| Nick Gammon
Australia (23,133 posts) Bio
Forum Administrator |
Date
| Reply #1 on Wed 29 Oct 2014 07:49 PM (UTC) |
Message
| What text are you matching on? Can you copy and paste that please? The order of the keywords does not matter. |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| Nick Gammon
Australia (23,133 posts) Bio
Forum Administrator |
Date
| Reply #2 on Wed 29 Oct 2014 07:50 PM (UTC) |
Message
| I should point out that plugins have their own set of variables, compared to the main world. You won't see any variables set in the GUI interface if the first trigger fires. It will be a plugin variable. |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| Mahony
(27 posts) Bio
|
Date
| Reply #3 on Wed 29 Oct 2014 07:54 PM (UTC) |
Message
| Found it!
here is the mistake
there are some spaces between the %1 and </send>
fix is
crap :P | Top |
|
The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).
To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.
12,078 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top