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, 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.
Entire forum
MUSHclient
General
IAC GA/EOR again...
It is now over 60 days since the last post. This thread is closed.
  Refresh page
Posted by
| Tsunami
USA (204 posts) bio
|
Date
| Sat 02 Jun 2007 09:04 PM (UTC) |
Message
| 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 | top |
|
Posted by
| Nick Gammon
Australia (23,042 posts) bio
Forum Administrator |
Date
| Reply #1 on Sat 02 Jun 2007 09:44 PM (UTC) |
Message
| If you want to write a plugin that specifically tests for that sequence in OnPluginPacketReceived, then yes you probably can.
Otherwise, not. |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | top |
|
Posted by
| Worstje
Netherlands (899 posts) bio
|
Date
| Reply #2 on Tue 12 Jun 2007 06:09 PM (UTC) Amended on Tue 12 Jun 2007 06:10 PM (UTC) by Worstje
|
Message
| 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. :) | top |
|
Posted by
| Shaun Biggs
USA (644 posts) bio
|
Date
| Reply #3 on Tue 12 Jun 2007 10:36 PM (UTC) |
Message
| 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. |
It is much easier to fight for one's ideals than to live up to them. | top |
|
Posted by
| Tsunami
USA (204 posts) bio
|
Date
| Reply #4 on Wed 13 Jun 2007 06:37 AM (UTC) |
Message
| 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. | top |
|
Posted by
| David Haley
USA (3,881 posts) bio
|
Date
| Reply #5 on Wed 13 Jun 2007 07:24 AM (UTC) |
Message
| 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? |
David Haley aka Ksilyan
Head Programmer,
Legends of the Darkstone
http://david.the-haleys.org | top |
|
Posted by
| Worstje
Netherlands (899 posts) bio
|
Date
| Reply #6 on Wed 13 Jun 2007 04:30 PM (UTC) |
Message
| 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. | top |
|
Posted by
| Tsunami
USA (204 posts) bio
|
Date
| Reply #7 on Wed 13 Jun 2007 07:07 PM (UTC) |
Message
| 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. | top |
|
Posted by
| Shaun Biggs
USA (644 posts) bio
|
Date
| Reply #8 on Wed 13 Jun 2007 07:12 PM (UTC) |
Message
| Bah, got the posters mixed up. I meant to try and figure out what Tsunami was trying to get out of the GA part. |
It is much easier to fight for one's ideals than to live up to them. | top |
|
Posted by
| Worstje
Netherlands (899 posts) bio
|
Date
| Reply #9 on Wed 13 Jun 2007 09:26 PM (UTC) |
Message
| 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. | 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.
28,423 views.
It is now over 60 days since the last post. This thread is closed.
  Refresh page
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.