Register forum user name Search FAQ

Gammon Forum

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 ➜ Bug reports ➜ Trigger with "omit from output" checked still displays CR/LF (?)

Trigger with "omit from output" checked still displays CR/LF (?)

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


Posted by Jcampbell20   (1 post)  Bio
Date Tue 01 Oct 2002 11:36 PM (UTC)
Message
Hello folks.

I'm trying to create a trigger that matches an incoming line and then does nada, no output sent anywhere, no replacing of anything, no script execution, nothing.

To do that I tried setting a trigger to (for example) match "* enters." and checked the "omit from output" option. The trigger matches ok, no visible text is displayed, however, the display area still scrolls. It looks like LF/CR are still being sent to the display even though no visible text is.

Is this a bug?

Thanks,
Jerry



Top

Posted by Magnum   Canada  (580 posts)  Bio
Date Reply #1 on Wed 02 Oct 2002 02:39 AM (UTC)
Message
Try clicking the button (in the trigger edit screen) called "Convert to regular expression" (or something like that). Leave the ^ and $ which signify start and end of line respectfully. That may solve your problem.

Get my plugins here: http://www.magnumsworld.com/muds/

Constantly proving I don't know what I am doing...
Magnum.
Top

Posted by Nick Gammon   Australia  (23,133 posts)  Bio   Forum Administrator
Date Reply #2 on Fri 04 Oct 2002 12:51 AM (UTC)
Message
Your original trigger should have worked, however check you haven't inadvertently put a newline into the "Send" box. Put the cursor there and hit "delete" key a few times.

Also, the screen will briefly scroll because the line is displayed before the trigger is evaluated, however apart from a slight flicker you should not be getting blank lines.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Norry   (16 posts)  Bio
Date Reply #3 on Thu 14 Nov 2002 10:43 PM (UTC)
Message
Actually, I'm having the same problem. I just recently made a batch of triggers to gag a really spammy mob and I get carriage returns whenever the triggers go off. I have checked to be sure I'm not sending anything so I have no idea what the problem is.

Basically, this mob has a prog that makes him do stuff everytime he enters the room. So I get something like this:


<100hp 100m 100mv>
The page arrives from the west.
The page bows.
The page asks 'Does anyone need anything?'

<100hp 100m 100mv>
The page leaves east.


When the triggers go off I get this:

<100hp 100m 100mv>

<100hp 100m 100mv>

<100hp 100m 100mv>


I have all the triggers set up, in the form:
^The page arrives from (.*?)\.$

Yes, regular expression is checked, and no, I'm not sending anything (or I shouldn't be anyway. I've checked). Any ideas?
Top

Posted by Nick Gammon   Australia  (23,133 posts)  Bio   Forum Administrator
Date Reply #4 on Thu 14 Nov 2002 11:45 PM (UTC)
Message
Judging by your output it is working as designed. However you have a blank line, see here ...


<100hp 100m 100mv>
The page arrives from the west.
The page bows.
The page asks 'Does anyone need anything?'
<-- blank line here remains 
<100hp 100m 100mv>


You could make a trigger to omit blank lines. Make sure you check under global preferences "regular expressions can match on an empty string". The regexp would be:

^$

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Nick Gammon   Australia  (23,133 posts)  Bio   Forum Administrator
Date Reply #5 on Thu 14 Nov 2002 11:46 PM (UTC)
Message
Of course, you will still get the prompts. You could conceivably set a flag (using a script) and then after the trigger goes off, omit the next prompt that follows.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Poromenos   Greece  (1,037 posts)  Bio
Date Reply #6 on Fri 15 Nov 2002 12:30 AM (UTC)
Message
No, they're right. MUSHClient still sends a CR/LF to the MUD. The line you're pointing at is user configurable from the MUD (on SMAUG servers it's config +blank), and sends a blank line before the prompt.
I have tried to omit from output, and it DOES send a CR/LF. My guess though would be that, although it evaluates the entire line (together with the prompt) as part of the trigger, and removes them all, it doesn't consider the CR/LF as part of the text to be matched, and sends that to the output, thinking that the user didn't want to omit that.

Vidi, Vici, Veni.
http://porocrom.poromenos.org/ Read it!
Top

Posted by Nick Gammon   Australia  (23,133 posts)  Bio   Forum Administrator
Date Reply #7 on Fri 15 Nov 2002 01:33 AM (UTC)
Message
A blank line before the prompt effectively makes a new line. MUSHclient matches on lines not groups of lines.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Poromenos   Greece  (1,037 posts)  Bio
Date Reply #8 on Fri 15 Nov 2002 03:58 PM (UTC)
Message
Ahh, now i understand what you mean... Is it possible to use the multiline edit bot ox MUSHClient to make it match on multiple lines? It would be very useful, since MUDs have the option of displaying multi-line prompts...

Vidi, Vici, Veni.
http://porocrom.poromenos.org/ Read it!
Top

Posted by Norry   (16 posts)  Bio
Date Reply #9 on Fri 15 Nov 2002 06:53 PM (UTC)
Message
I didn't realize that "config +blank" would make a difference. So I've been playing with it and found that the only thing that really works is going "config -blank" and having a trigger that omits my prompt from the output. However, this squishes my output and makes it hard to read. Oh, well, thanks anyway, Nick.
Top

Posted by Nick Gammon   Australia  (23,133 posts)  Bio   Forum Administrator
Date Reply #10 on Fri 15 Nov 2002 07:22 PM (UTC)
Message
Quote:

Is it possible to use the multiline edit bot ox MUSHClient to make it match on multiple lines?


It is hard to design a trigger that will match on multiple lines. At present the newline character is a logical place to do trigger matching. For instance, with the following lines:

a
b
c
d

What would you send to trigger matching? a/b? a/b/c? b/c? a/b/c/d? b/c/d? You see what I mean?

I think in the earlier problem, you could have a trigger that omits a blank line, as I suggested, and enable that trigger when you get the annoying player trigger match, and disable that trigger when the next prompt arrives. That way you only omit the relevant blank lines.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Poromenos   Greece  (1,037 posts)  Bio
Date Reply #11 on Sat 16 Nov 2002 03:01 PM (UTC)
Message
Hmm, yes, you have a point... You'd either have to pass it character by character or pass all the different combinations, which is almost impossible...

Vidi, Vici, Veni.
http://porocrom.poromenos.org/ Read it!
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.


30,657 views.

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

Go to topic:           Search the forum


[Go to top] top

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