Multi-line triggers stopped working? (v5.05)

Posted by AdInfinitum on Wed 15 Mar 2017 02:02 PM — 8 posts, 32,922 views.

#0
For years, and for several versions, I've had a multi-line trigger in one of my plugins. I've since upgraded (using Fiendish's update installer for AardMUSH, which incorporates v5.05), and my plugin stopped working.

After some debugging, it was discovered the multi-line trigger was not firing. I set it to a single line, and it worked. Curious, I set up the same trigger locally and disabled the plugin. The trigger did not fire. See the trigger below:


<triggers>
  <trigger
   enabled="y"
   group="Multi Line"
   lines_to_match="2"
   keep_evaluating="y"
   match="for lines marked \'\*\'\. See \'help gamestat\' on those\.\n\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\Z"
   multi_line="y"
   regexp="y"
   send_to="12"
   sequence="100"
  >
  <send>Note("Multi-line fired!")</send>
  </trigger>
</triggers>


Should match:

for lines marked '*'. See 'help gamestat' on those.
-------------------------------------------------------


This trigger was created by highlighting the two lines, right-clicking, and choosing the Multi-Trigger option. This is off "gamestat 5" in Aardwolf, though you can Simulate it, as well.

Did something change that would cause this to no longer work? I can do a workaround by using an 'EnableTrigger' for each line I want to work with, but that's not very efficient.

Also, ugh, the cursed anti-spam... can't edit the post when crucial information is missing, and that's irritating. *sigh* Should not apply to edits of your own post...
Amended on Wed 15 Mar 2017 02:15 PM by AdInfinitum
USA Global Moderator #1
What plugins do you have loaded?

Quote:
Also, ugh, the cursed anti-spam

That shouldn't hit you anymore.
Amended on Wed 15 Mar 2017 06:04 PM by Fiendish
#2
Fiendish said:

What plugins do you have loaded?


Everything that comes with standard MUSH, and a few miscellaneous plugins. There's only one plugin that uses multi-triggers, though, and that's my double predictor. Even locally, and even in a fresh install, the multi-line trigger does not work.

Fiendish said:

Quote:
Also, ugh, the cursed anti-spam

That shouldn't hit you anymore.


Not sure if this is meant to say that I've been unflagged as a newbie poster, or that I should have been unflagged as a newbie poster. If the latter, as of the new post, I couldn't post anything for 15 minutes when I needed to make an edit. If the former, thank you if you did something, or if not, then I'm glad it'll no longer hit me.
Amended on Wed 15 Mar 2017 08:48 PM by AdInfinitum
Australia Forum Administrator #3
I just added your trigger and tried your test data and it fired in v5.05.


for lines marked '*'. See 'help gamestat' on those.
-------------------------------------------------------
Multi-line fired!


Thus, something else is going on. Try testing yourself on a fresh world (effectively what I did). Also try turning on Game -> Trace.

Quote:

That shouldn't hit you anymore.


Fiendish marked you as trusted.

You can make the trigger a bit shorter like this:


for lines marked \'\*\'\. See \'help gamestat\' on those\.\n\-{55}\Z


This won't affect the functionality.
#4
So turns out Fiendish's "Text_substitutions" plugin that comes with AardMUSH standard now is what is causing the problem. I went through a fresh copy of the download, removing each plugin I could until it fired, and after removing that plugin, that's when it fired.

I guess the issue now is in Fiendish's hands.

Also, I do have it shortened in the plugin itself. I just did a Multi-line trigger which put it in that format.
USA Global Moderator #5
I thought it might be something like that. *sigh*
I'm trying to find a fix. For now, I guess the plugin is not compatible with multiline triggers.
Amended on Thu 16 Mar 2017 07:18 AM by Fiendish
Australia Forum Administrator #6
It has possibly been fixed in this pre-release version for 5.06.

You can download MUSHclient.exe as described here:

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


I have tested the multi-line trigger issue with Fiendish's Text_Substitutions plugin, and the fix in 5.06 appears to fix the issue.

Basically, the way he was implementing text substitution was to omit each line, attempt to do substitutions, and then Simulate the line back.

However the earlier versions of MUSHclient kept both copies in the "recent output" list, which is what is tested against with multi-line triggers. For example:


Recent lines
----------
Testing 1 - 03/17/17 16:16:42
Testing 1 - 03/17/17 16:16:42
Testing 2 - 03/17/17 16:16:42
Testing 2 - 03/17/17 16:16:42
Testing 3 - 03/17/17 16:16:42
Testing 3 - 03/17/17 16:16:42
Testing 4 - 03/17/17 16:16:42
Testing 4 - 03/17/17 16:16:42
Testing 5 - 03/17/17 16:16:42
Testing 5 - 03/17/17 16:16:42
Testing 6 - 03/17/17 16:16:42
Testing 6 - 03/17/17 16:16:42
Testing 7 - 03/17/17 16:16:42
Testing 7 - 03/17/17 16:16:42
Testing 8 - 03/17/17 16:16:42
Testing 8 - 03/17/17 16:16:42
Testing 9 - 03/17/17 16:16:42
Testing 9 - 03/17/17 16:16:42
Testing 10 - 03/17/17 16:16:42
Testing 10 - 03/17/17 16:16:42
----------


You can see that each line is there twice.

With 5.06 each line is only there once:


Recent lines
----------
Testing 1 - 03/17/17 16:19:21
Testing 2 - 03/17/17 16:19:21
Testing 3 - 03/17/17 16:19:21
Testing 4 - 03/17/17 16:19:21
Testing 5 - 03/17/17 16:19:21
Testing 6 - 03/17/17 16:19:21
Testing 7 - 03/17/17 16:19:21
Testing 8 - 03/17/17 16:19:21
Testing 9 - 03/17/17 16:19:21
Testing 10 - 03/17/17 16:19:21
----------
#7
Works a charm. Thanks for the fix on your end that allowed Fiendish's stuff to work. Seriously, the amount of care you have in making sure your users are happy is astonishing, and well-appreciated.