View Single Post
Old 03-25-2007, 04:28 PM   #21
shadowfyr
Senior Member
 
Join Date: Oct 2002
Posts: 310
shadowfyr will become famous soon enough
Umm.. ff f9, also known as IAC EOR/GA.

Its a go-ahead code sent by some muds, and apparently implimented in the TMI-2 mudmail editor, though not on prompts... Some muds support it, others don't. Mushclient has a feature you can turn on for, "Convert IAC EOR/GA to newline.", which allows prompts to function as though they actually had a /n in them, but it only works *if* the prompt has IAC EOR/GA at its end. In any case, if the mud sends and the client recognized this, then its trivial to determine if the line is a prompt or not.

But yeah, lots of screwy stuff has been added to Mushclient to get around this stuff, including the fact that while a line will "display" as its recieved (most never exceed the packet size), triggers that attempt to look at the line and figure out what is going on only fire "after" the newline, hence converting the IAC EOR/GA to a newline to make the prompt trigger immediately. If you can't, then you get something like this in script:

[code] OnPluginPacketRecieved () {
if stored packet then
retrieve packet
add new packet to old packet
onpluginpacketrecieved = false
exit function;

'do some regular expression checking.
if complete prompt then
do some stuff to it and put in changed_line
world.simulate changed_line
else if no newline
store packet
onpluginpacketrecieved = false
else
on pluginpacketrecieved = true ' Let the client handle it.
}[/quote]

You can do some crazy things with Mushclient, some of it just to work around silly BS like having no control over what the mud is actually sending you, substituting words and things into the packet (since you can't do that after a line already exists and a newline has scrolled it), etc. Substitution is a bit easier in some, but most of those use some other sort of system to handle triggers, like maybe keeping a list of triggers that it appears *may* match the line, and throwing out the ones that don't as more data arrives?? Who knows...

But yeah, the MXP spec is rather screwy in some places.. Though, in the case of that element thing, what is means is that a line containing the element will substitute the
[code] "<FONT COLOR=Red><B>"[/quote]

part for it, so the code you get is like:

[code] RName My Big Room<\b>

<FONT COLOR=Red><B>My Big Room<\b>[/quote]

XML includes a way to add element replacement like that as well, but what people forget is that this isn't XML, its HTML with some goofy things tacked on, and in the spirit of HTML the behaviour of when and if certain attributes get terminated differs based on *what* those things are. Something like a color, one would presume, would continue to be present until changed, other things are line by line based. Unfortunately, like HTML, zMud liked to try to guess what was intended when tags where mangled. A condition that has resulted, in the browser world, in 3-4 different clients, none of which actually correctly follow the W3C specs or can display their test page, and where the page design standards end up instead being set by the quircks and idiocies of the most popular browser.
shadowfyr is offline   Reply With Quote