Client Parsing?
- Lyanic
-
Topic Author
- Offline
- Junior Member
- Posts: 22
- Thank you received: 1
I don't know if it's a protocol issue, improper handling of EOL characters, or something else. My code sends "\r\n" for linebreaks, and supports the following protocols: ANSI, ATCP, MCCP1/2, MSDP, MSP, MXP, NAWS, TTYPE, UTF8, and xterm256.
Please Log in or Create an account to join the conversation.
- plamzi
-
- Offline
- Administrator
- Posts: 285
- Thank you received: 42
Lyanic wrote: Someone logged into 7th Plane yesterday from the MUD Portal web client, complaining of odd display issues. I checked it out myself, and it seems to be inserting extra EOL characters, which wreaks havoc on ASCII art and maps.
I don't know if it's a protocol issue, improper handling of EOL characters, or something else. My code sends "\r\n" for linebreaks, and supports the following protocols: ANSI, ATCP, MCCP1/2, MSDP, MSP, MXP, NAWS, TTYPE, UTF8, and xterm256.
Try now. I don't have time to get to the bottom of the issue but I added a workaround.
If you want to help track this down, take a look at the .out window and "ui.js" with something like Firebug. I saw two linebreaks in the welcome screen art where there should be one. The extra one ends up in a span tag with nothing but whitespaces behind it.
The workaround is at line 1517 ATM:
t = t.replace(/<span(.+?)>\n( +?)</g,'<span$1>$2<');
Please Log in or Create an account to join the conversation.
- plamzi
-
- Offline
- Administrator
- Posts: 285
- Thank you received: 42
Please Log in or Create an account to join the conversation.
- Arynth
-
- Offline
- New Member
- Posts: 7
- Thank you received: 0
As for MXP, it only sends it on certain lines, not on all lines like this, and only if it is turned on through negotiation. If it isn't enabled, it will not be sent. Same for any other Out-of-band data we send (MSDP, ATCP, etc).
Please Log in or Create an account to join the conversation.
- plamzi
-
- Offline
- Administrator
- Posts: 285
- Thank you received: 42
Arynth wrote: I know the mud sends a format clear on each new line, so that might be causing it, but I will have to double check the code and see.
Sounds like a good lead. Let me know what that looks like.
Please Log in or Create an account to join the conversation.
- Arynth
-
- Offline
- New Member
- Posts: 7
- Thank you received: 0
The who list and in game maps are the easiest to see it, and are both locations where there is only one /r/n sent per line, so it shouldn't be doing anything odd there. Do you know of an easy way to see the raw data coming from the mud to your client? Just trying to track down where these extra returns are.
Oddest thing: the html source code (Chrome on OSX) only has \n's between the span elements in the Divs. I know we send \r\n, but these only have \n. I didn't see where you are parsing those out, though I admit to not looking very hard either (at work).
Please Log in or Create an account to join the conversation.
- Tijer
-
- Offline
- Senior Member
- Posts: 41
- Thank you received: 0
Please Log in or Create an account to join the conversation.
- plamzi
-
- Offline
- Administrator
- Posts: 285
- Thank you received: 42
The stuff that's causing the extra line breaks at the welcome screen is an ANSI color sequence: [1;37m[0m\n
Can you take this further? Thanks.
Please Log in or Create an account to join the conversation.
- plamzi
-
- Offline
- Administrator
- Posts: 285
- Thank you received: 42
Tijer wrote: my listing has suddenly stopped letting me connect via here... dont think i edited anything.. dunno..
Fixed. Not sure how it broke.
Please Log in or Create an account to join the conversation.
- Tijer
-
- Offline
- Senior Member
- Posts: 41
- Thank you received: 0

Please Log in or Create an account to join the conversation.
- plamzi
-
- Offline
- Administrator
- Posts: 285
- Thank you received: 42
Tijer wrote: thanks
..... strange issue tho.. extra lines between everything.. and some colors not displaying properly... My MUD utilizes kavirs mud protocol snippet. so i dont know if that is causing issues
Will sort these issues out quickly. Up until a few days ago, the app was only pointing to my game, so the parsing code is still very lazy and gimmicky.
I have a theory about how that button broke and how to prevent it from happening again. Thanks for catching it.
Please Log in or Create an account to join the conversation.
- plamzi
-
- Offline
- Administrator
- Posts: 285
- Thank you received: 42
Please Log in or Create an account to join the conversation.
- Tijer
-
- Offline
- Senior Member
- Posts: 41
- Thank you received: 0
only thing that isnt is the Dark White ANSI sequence... (aka Default)
Please Log in or Create an account to join the conversation.
- Tijer
-
- Offline
- Senior Member
- Posts: 41
- Thank you received: 0
Please Log in or Create an account to join the conversation.
- Tijer
-
- Offline
- Senior Member
- Posts: 41
- Thank you received: 0

Please Log in or Create an account to join the conversation.
- Lyanic
-
Topic Author
- Offline
- Junior Member
- Posts: 22
- Thank you received: 1
P.S. Thanks for all the quick updates to the site/client, and for adding an image back to my game listing. I like the direction of this site so far.
Please Log in or Create an account to join the conversation.
- plamzi
-
- Offline
- Administrator
- Posts: 285
- Thank you received: 42
Lyanic wrote: it's a little more "orange" than I'm used to from most other clients. That's very subjective and nitpicky, though. Is there any chance of supporting xterm256 in the future?
Eventually, we'll have a module for customizing the basic colors, another module for xterm256, the whole nine. I'm making a push to get us to a point where multiple contributors can customize the app via the website, at the same time.
Please Log in or Create an account to join the conversation.
- Tijer
-
- Offline
- Senior Member
- Posts: 41
- Thank you received: 0
Please Log in or Create an account to join the conversation.
- plamzi
-
- Offline
- Administrator
- Posts: 285
- Thank you received: 42
Tijer wrote: the updates to the client to use mxp are messing up on my mud.... my mxpified exits, are merging with my prompt.. i think it may be something to do with how KaVir's snippet parses mXp.... ofcourse i could be totally wrong....
The plugin is very first-draft. I'll take a look later tonight.
Please Log in or Create an account to join the conversation.
- Tijer
-
- Offline
- Senior Member
- Posts: 41
- Thank you received: 0
Please Log in or Create an account to join the conversation.