IAC GA/EOR again...

Posted by Tsunami on Sat 02 Jun 2007 09:04 PM — 10 posts, 39,822 views.

USA #0
So, I was wondering whether it'd be possible for you to treat IAC GA/EOR as a newline for the purposes of triggers and everything else, but not -display- it as a newline? So if something was recieved like:

<stuff> IAC GA <more stuff, maybe with newlines>

a trigger such as ^<stuff>$ would match correctly, and all other handling would be similar, except that on the screen, IAC GA is not rendered as a newline. Is this possible? Thanks -Tsunami
Australia Forum Administrator #1
If you want to write a plugin that specifically tests for that sequence in OnPluginPacketReceived, then yes you probably can.

Otherwise, not.
Netherlands #2
Why would you want that? Do you want to see commands you enter directly following the prompt as is 'custom' in IRE muds?

You could always tinker with DeleteLines(1) and re-echo the prompt with your command added to it, or something like that.

Edit: And oops, the post was kind of old. I thought it was somewhat more recent. :)
Amended on Tue 12 Jun 2007 06:10 PM by Worstje
USA #3
Worstje probably just wants a set of triggers that fire on the prompt, but don't change how the output looks to the user. I know on the mud that I play on, a few people would get annoyed at the extra line. Then again, other people don't like that I don't toss in blank lines after plugin output, so I have a flag they can set for the extra lines. Most are rather indifferent though.
USA #4
My understanding is that that is the way GA/EOR is supposed to be handled. Ie, that it signifies the end of the line, which the client can handle as needed, but should not be displayed as a newline character. I could be wrong of course.
USA #5
I think that the go-ahead command was to have a meaning similar to the "over" convention in radio. My understanding from reading a few websites is that the lines were half-duplex in that only one person could be sending data at a time. Therefore, when the server was done printing its output and wanted the user to do something, it would send a go-ahead to indicate that it was done printing for now.

So it is not necessarily an end-of-line command, rather, it is a prompt for input of sorts.

So I suppose that for the purposes of handling triggers, it might make sense to treat it as an end-of-line, because it marks a clear termination of a "logical line" sent by the server.

Nonetheless this seems relatively easy to implement in a packet analyzing plugin, no?
Netherlands #6
Uhm, I never wanted anything. I can do everything I want with the IAC EOR/GA option. I was merely replying to Tsunami. :)

If you want to gag the extra line that follows it, you can just trigger the prompt (which can be triggered once you have it on since the setting translates it to a complete line that MUSHclient can process), which turns on a group that triggers an empty line first and then any line, essentially making it possible to gag the superfluous line without affecting other empty lines that you may wish to keep.
USA #7
That is in fact exactly what I have done. The issue (and it's not a very big one) is that sometimes the prompt is followed by an intentional newline, not one produced as a result of GA/EOR, and which thus should not be gagged. Still, as I mentionned it really doesn't affect me at all, it's just a stylistic issue.
USA #8
Bah, got the posters mixed up. I meant to try and figure out what Tsunami was trying to get out of the GA part.
Netherlands #9
Well, that still doesn't mess it up. The 'unintentional' new line is ALWAYS THERE.

So:

Trigger prompt -> EnableTriggerGroup("prompttrigger", true)
Trigger ^$ (group="prompttrigger",sequence="1",omitfromoutput=true,keepevaluating=false) -> EnableTriggerGroup("prompttrigger", false)

Trigger ^.+$ (group="prompttrigger", sequence="2",keepevaluating="true") -> EnableTriggerGroup("prompttrigger", false)

Given that set of triggers (too lazy to open up mush and actually make them right now) would have the following effect.

The following:

PROMPT (shown)
EMPTYLINE (gagged)
EMPTYLINE (shown)
OTHERLINE (shown)

and

PROMPT (shown)
EMPTYLINE (gagged)
OTHERLINE (shown)
EMPTYLINE (shown)

and even the hypothetical version that ought not to happen:

PROMPT (shown)
OTHERLINE (shown)
EMPTYLINE (shown)
OTHERLINE (shown)

will all show stuff as intended.