Disable trigger for same line.

Posted by Worstje on Wed 07 May 2008 08:38 AM — 4 posts, 12,922 views.

Netherlands #0
Essentially, I have a catch-all triggers as part of a script, that gags all it encounters. However, right after this unknown amount of text, I have some text that shouldn't be gagged (nor be cause of said triggers execution). Manually echoing this 'finish' line isn't an option since other users of my plugin may actually like to gag that line.

So I've been trying to give my catch-all trigger a higher sequence than the 'finish' line, so that the finish line matches earlier and can disable the second one from firing. Sadly, this does not seem to work as MUSHclient calculates all triggers in advance. Does anyone know a proper way I could work around this, per chance?
Australia Forum Administrator #1
Check out:

http://www.gammon.com.au/forum/?id=6554

If a trigger does "send to script" it should happen immediately, not be batched up.

However plugins are treated as a batch. That is, triggers are not re-ordered into sequence order amongst batches. Put another way, the plugins are evaluated one-by-one, in an order that can't be easily predicted, however for a particular plugin, triggers are evaluated in sequence (which makes sense from the plugin's point of view).

There are potential sequencing problems here, however if you are using a script file, and not send-to-script, using send-to-script might help.
Netherlands #2
The plugins in question are part of a plugin. However, just to make sure I understand it correctly... By making the 'finish' line trigger in 'Send To Script' style, I can prevent the 'match and gag everything' trigger from matching/gagging/executing?
Australia Forum Administrator #3
Yes that is what I am saying. Try it and see.