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

Gammon Software Solutions forum

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

[Folder]  Entire forum
-> [Folder]  MUSHclient
. -> [Folder]  General
. . -> [Subject]  gagging multiple line triggers
Home  |  Users  |  Search  |  FAQ
Username:
Register forum user name
Password:
Forgotten password?

gagging multiple line triggers

It is now over 60 days since the last post. This thread is closed.   [New subject]  Start a new subject   [Refresh] Refresh page


Posted by Jimbob   (4 posts)  [Biography] bio
Date Mon 23 Feb 2009 01:21 PM (UTC)  quote  ]
Message
If I have a multiline trigger like the following
^line1\nline2\z

Is it possible to gat both line1 and line2?
[Go to top] top

Posted by Worstje   Netherlands  (867 posts)  [Biography] bio
Date Reply #1 on Mon 23 Feb 2009 02:42 PM (UTC)  quote  ]

Amended on Mon 23 Feb 2009 07:03 PM (UTC) by Worstje

Message
Yes it is possible. Although I am not sure what you mean 'get both line1 and line2.'

If you mean you want them captured as %1 and %2, make it a regular expression like... ^(Line1)\n(Line2)\z

If the problem is getting the trigger to work, you may just need to turn multi-line on, and set lines to match to 2.


Edit: oi, I need to read better. I totally didn't read (or realize the contents of) the subject line. :(
[Go to top] top

Posted by WillFa   USA  (517 posts)  [Biography] bio
Date Reply #2 on Mon 23 Feb 2009 06:02 PM (UTC)  quote  ]
Message
Gagging them isn't as straight forward as just the check box "Omit from Output".

You could script out a call to "DeleteLines" and remove the last 2 lines on match with the one mutliline trigger.

Alternatively, 2 triggers would probably be easier.
^line1$
omit_from_output = 'y'
<send> EnableTrigger "GagLine2" </send>

and

^line2$
name="GagLine2"
omit_from_output="y"
<send>EnableTrigger ("GagLine2", false) </send>
[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,434 views.

It is now over 60 days since the last post. This thread is closed.   [New subject]  Start a new subject   [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.

[Home]

Written by Nick Gammon - 5K

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

[Best viewed with any browser - 2K]    [Web site powered by FutureQuest.Net]