[Home] [Downloads] [Search] [Help/forum]

Gammon Forum

See www.mushclient.com/spam for dealing with forum spam. Please read the MUSHclient FAQ!

[Folder]  Entire forum
-> [Folder]  MUSHclient
. -> [Folder]  Bug reports
. . -> [Subject]  Multi-line triggers stopped working? (v5.05)
Home  |  Users  |  Search  |  FAQ
Username:
Register forum user name
Password:
Forgotten password?

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

It is now over 60 days since the last post. This thread is closed.     [Refresh] Refresh page


Posted by AdInfinitum   (22 posts)  [Biography] bio
Date Wed 15 Mar 2017 02:02 PM (UTC)

Amended on Wed 15 Mar 2017 02:15 PM (UTC) by AdInfinitum

Message
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...
[Go to top] top

Posted by Fiendish   USA  (1,641 posts)  [Biography] bio   Global Moderator
Date Reply #1 on Wed 15 Mar 2017 06:03 PM (UTC)

Amended on Wed 15 Mar 2017 06:04 PM (UTC) by Fiendish

Message
What plugins do you have loaded?

Quote:
Also, ugh, the cursed anti-spam

That shouldn't hit you anymore.

https://github.com/fiendish/aardwolfclientpackage
[Go to top] top

Posted by AdInfinitum   (22 posts)  [Biography] bio
Date Reply #2 on Wed 15 Mar 2017 06:51 PM (UTC)

Amended on Wed 15 Mar 2017 08:48 PM (UTC) by AdInfinitum

Message
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.
[Go to top] top

Posted by Nick Gammon   Australia  (21,322 posts)  [Biography] bio   Forum Administrator
Date Reply #3 on Wed 15 Mar 2017 08:47 PM (UTC)
Message
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.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by AdInfinitum   (22 posts)  [Biography] bio
Date Reply #4 on Wed 15 Mar 2017 09:03 PM (UTC)
Message
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.
[Go to top] top

Posted by Fiendish   USA  (1,641 posts)  [Biography] bio   Global Moderator
Date Reply #5 on Thu 16 Mar 2017 05:54 AM (UTC)

Amended on Thu 16 Mar 2017 07:18 AM (UTC) by Fiendish

Message
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.

https://github.com/fiendish/aardwolfclientpackage
[Go to top] top

Posted by Nick Gammon   Australia  (21,322 posts)  [Biography] bio   Forum Administrator
Date Reply #6 on Fri 17 Mar 2017 05:22 AM (UTC)
Message
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
----------

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by AdInfinitum   (22 posts)  [Biography] bio
Date Reply #7 on Fri 17 Mar 2017 10:27 PM (UTC)
Message
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.
[Go to top] 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.


1,842 views.

It is now over 60 days since the last post. This thread is closed.     [Refresh] Refresh page

Go to topic:           Search the forum


[Go to top] top

Quick links: MUSHclient. MUSHclient help. Forum shortcuts. Posting templates. Lua modules. Lua documentation.

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.

[Home]


Written by Nick Gammon - 5K   profile for Nick Gammon on Stack Exchange, a network of free, community-driven Q&A sites   Marriage equality

Comments to: Gammon Software support
[RH click to get RSS URL] Forum RSS feed ( https://gammon.com.au/rss/forum.xml )

[Best viewed with any browser - 2K]    [Hosted at FutureQuest]