Gagging not working as expected

Posted by John on Tue 26 Apr 2005 04:42 AM — 3 posts, 20,051 views.

Australia #0
Hey,

Sorry for asking such a basic question, but I can't work it out. I'm using Nick's "Health Bar" Plugin and I now want to gag the prompt from my output window.

I've set up the trigger to act on this string: "^\<(.*?)\/(.*?) hp(.*?)$" and have ticked the following boxes:
* Enabled
* Omit from log file
* Omit from output
* Regular expression

However it only gags it once something happens on the screen. Every other time it is there at the bottom of the screen.

It's a -great- way to get your prompt only appearing at the bottom, but that isn't what I want ;)

So what am I doing wrong?
USA #1
Nothing.
The problem is, well, a problem with all (most) servers.

The thing is, they send the prompt, and NO Newline. Mushclient waits for a newline to check triggers (since otherwise, how is it to know the line has ended?).

There are a couple of work arounds, the newest is with a plugin that checks lines BEFORE the newline (by monitoring the packets) and then inserts a newline after the prompt has been received. However, less work than that (if your server allows it) is adding a newline to the end of your prompt (some servers allow you to do this, to allow for multiline prompts, or whatever).

You can find details on the former here:
http://www.gammon.com.au/forum/bbshowpost.php?bbsubject_id=5020

For the latter (assuming your server allows you to edit the prompt, only some do) check your help file to see if you can add a newline to the end of your prompt. Then youll have 'most' of the prompt already proccessed and then a little bit of it hanging around, but it'll be a blank (a space perhaps) and you can gag that too (after something else arrives).
Amended on Tue 26 Apr 2005 04:56 AM by Flannel
#2
Most muds have a carriage return option for prompts, for multi-line prompts. I suggest that you add a carriage return at the end of your prompt. That should sove the issue.