Client Parsing?

More
13 Aug 2013 13:59 #1 by Lyanic
Client Parsing? was created by Lyanic
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.

Please Log in or Create an account to join the conversation.

  • plamzi
  • plamzi's Avatar
  • Away
  • Administrator
More
13 Aug 2013 14:43 #2 by plamzi
Replied by plamzi on topic Client Parsing?

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
  • plamzi's Avatar
  • Away
  • Administrator
More
13 Aug 2013 14:55 #3 by plamzi
Replied by plamzi on topic Client Parsing?
You mentioned MXP. Just on a hunch, is the game sending out-of-band data that may have line breaks inside it?

Please Log in or Create an account to join the conversation.

More
13 Aug 2013 15:25 #4 by Arynth
Replied by Arynth on topic Client Parsing?
I was also testing the Client out on the 7th Plane. I played with Chrome Dev Tools some, and found why it displays like it does, though not why it's getting put in the client. There are extra returns in your generated Div elements, between the Spans. I am still trying to see where those are coming from. 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.

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
  • plamzi's Avatar
  • Away
  • Administrator
More
13 Aug 2013 15:41 #5 by plamzi
Replied by plamzi on topic Client Parsing?

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.

More
13 Aug 2013 16:31 #6 by Arynth
Replied by Arynth on topic Client Parsing?
Played with it for awhile, and can't see where it would be sending any extra returns. If it was, other clients would show them as well, not just here.

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.

More
13 Aug 2013 16:38 #7 by Tijer
Replied by Tijer on topic Client Parsing?
my listing has suddenly stopped letting me connect via here... dont think i edited anything.. dunno..

Please Log in or Create an account to join the conversation.

  • plamzi
  • plamzi's Avatar
  • Away
  • Administrator
More
13 Aug 2013 16:45 #8 by plamzi
Replied by plamzi on topic Client Parsing?
I enabled console.log of raw input.

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
  • plamzi's Avatar
  • Away
  • Administrator
More
13 Aug 2013 16:48 #9 by plamzi
Replied by plamzi on topic Client Parsing?

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.

More
13 Aug 2013 16:51 #10 by Tijer
Replied by Tijer on topic Client Parsing?
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

Please Log in or Create an account to join the conversation.

  • plamzi
  • plamzi's Avatar
  • Away
  • Administrator
More
13 Aug 2013 16:54 #11 by plamzi
Replied by plamzi on topic Client Parsing?

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
  • plamzi's Avatar
  • Away
  • Administrator
More
13 Aug 2013 17:41 #12 by plamzi
Replied by plamzi on topic Client Parsing?
I believe the extra line feeds issue is behind us.

Please Log in or Create an account to join the conversation.

More
13 Aug 2013 17:43 #13 by Tijer
Replied by Tijer on topic Client Parsing?
Yep working correctly for my MUD

only thing that isnt is the Dark White ANSI sequence... (aka Default)

Please Log in or Create an account to join the conversation.

More
13 Aug 2013 17:50 #14 by Tijer
Replied by Tijer on topic Client Parsing?
Also light green ansi color is showing as yellow..

Please Log in or Create an account to join the conversation.

More
13 Aug 2013 17:56 #15 by Tijer
Replied by Tijer on topic Client Parsing?
almost there :)

Please Log in or Create an account to join the conversation.

More
14 Aug 2013 00:14 #16 by Lyanic
Replied by Lyanic on topic Client Parsing?
Yes, the linebreak issue seems fixed on 7th Plane too. The colors look fine to me. If I had a complaint about one, it'd be the brown/orange ANSI color - 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?

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
  • plamzi's Avatar
  • Away
  • Administrator
More
14 Aug 2013 01:57 #17 by plamzi
Replied by plamzi on topic Client Parsing?

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.

More
16 Aug 2013 22:18 - 16 Aug 2013 22:18 #18 by Tijer
Replied by Tijer on topic Client Parsing?
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....
Last edit: 16 Aug 2013 22:18 by Tijer.

Please Log in or Create an account to join the conversation.

  • plamzi
  • plamzi's Avatar
  • Away
  • Administrator
More
16 Aug 2013 22:34 #19 by plamzi
Replied by plamzi on topic Client Parsing?

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.

More
16 Aug 2013 22:35 #20 by Tijer
Replied by Tijer on topic Client Parsing?
not a problem just thought id let ya know...

Please Log in or Create an account to join the conversation.

  • plamzi
  • plamzi's Avatar
  • Away
  • Administrator
More
16 Aug 2013 22:48 #21 by plamzi
Replied by plamzi on topic Client Parsing?

Tijer wrote: not a problem just thought id let ya know...


Easy fix. Take a look?

Please Log in or Create an account to join the conversation.

  • plamzi
  • plamzi's Avatar
  • Away
  • Administrator
More
18 Aug 2013 20:17 #22 by plamzi
Replied by plamzi on topic Client Parsing?
There's now the ability to send straight up HTML from the server. You just need to preface your HTML ">" and "<" brackets with an ASCII ESC char (decimal "\027", hex "\x1B") so the client would know not to turn them into literal &lt and &gt characters.

Please Log in or Create an account to join the conversation.

More
24 Aug 2013 13:31 #23 by Tijer
Replied by Tijer on topic Client Parsing?
see stuffs changed a lot here... cant seem to work out HOW to connect to my mud from here now though! Unless im being completely brain dead!!!

Please Log in or Create an account to join the conversation.

More
24 Aug 2013 13:37 #24 by dentin
Replied by dentin on topic Client Parsing?
I can't either; I click on the game name and it does something, but when I click on the actual play button, nothing happens. It just sits there. How do you make the client start the connection?

Please Log in or Create an account to join the conversation.

More
24 Aug 2013 13:38 #25 by Tijer
Replied by Tijer on topic Client Parsing?
glad its not only me then :)

Please Log in or Create an account to join the conversation.

  • plamzi
  • plamzi's Avatar
  • Away
  • Administrator
More
24 Aug 2013 13:58 #26 by plamzi
Replied by plamzi on topic Client Parsing?

dentin wrote: I can't either; I click on the game name and it does something, but when I click on the actual play button, nothing happens. It just sits there. How do you make the client start the connection?


Does it work when you're not logged into the site? Which browser? Do you see any js errors?

Please Log in or Create an account to join the conversation.

More
24 Aug 2013 14:22 #27 by dentin
Replied by dentin on topic Client Parsing?
It seems to work when I'm not logged in, but when logged in the big connect window doesn't show up. I'm currently using Firefox 23 on Ubuntu.

I have to leave for an extended period of time; sorry if I don't respond further for a few days.

-dentin

Alter Aeon MUD
www.alteraeon.com

Please Log in or Create an account to join the conversation.

  • plamzi
  • plamzi's Avatar
  • Away
  • Administrator
More
24 Aug 2013 15:05 #28 by plamzi
Replied by plamzi on topic Client Parsing?
Fixed. Thanks for reporting, guys.

Please Log in or Create an account to join the conversation.

More
24 Aug 2013 15:10 #29 by Tijer
Replied by Tijer on topic Client Parsing?
appears to be working now for Chrome also!!

Please Log in or Create an account to join the conversation.

More
24 Aug 2013 17:03 #30 by Lyanic
Replied by Lyanic on topic Client Parsing?
I'm getting some strange results with colors on my game now. Here's a screenshot:



You can ignore the names (aside from a description of approximately what color they should be), since those are just my internal tags for them. The issue is that some show up, and some don't at all - they're just default text color.

Also, should MXP clickable links be working yet? Specifically something like this: #<send href="help combat">COMBAT#</send>

If you want something to test against, you can check the 'colors' and 'areas' commands.

Of course, it's possible that some of these issues are on my end. I have a somewhat complex client negotiation process on connection. I saw that you added a TTYPE response to identify the MUDPortal client. I haven't added any special code to handle that yet.

Please Log in or Create an account to join the conversation.

  • plamzi
  • plamzi's Avatar
  • Away
  • Administrator
More
24 Aug 2013 17:28 #31 by plamzi
Replied by plamzi on topic Client Parsing?
I'll look into the colors issue.

MXP clickable links should be working. Let me know where to see one that doesn't.

Please Log in or Create an account to join the conversation.

More
24 Aug 2013 18:58 #32 by Lyanic
Replied by Lyanic on topic Client Parsing?
The xterm256 colors on 7th Plane look MUCH BETTER now. Thanks.

As for MXP clickable links: the 'areas' command. However, I think the issue is that MXP still isn't getting negotiated correctly. I'm going to run some tests on my end, and I'll get back to you about that.

Please Log in or Create an account to join the conversation.

More
26 Aug 2013 14:14 #33 by Tijer
Replied by Tijer on topic Client Parsing?
Are you going to ever make background colors work? One of my test muds, which i originally added 256 color to, replacing all other versions of color refuses to show background colors. Also MXP links dont seem to work there.. (they used to) the muds not listed on this site, but the address is godwars.net port 2770...

Would also appear that the client is reporting its self as MUDPortal Client 1.0, when it should be MudPortal Client, and have 1.0 in the version field, you can see this when you type "FInger (yourname)" in the mud. Also MXPVersion is not being set, not sure if this is an actual requirement or not.

I like hades_kane, have a "colorlist" command which pretty much works exactly the same as his, theres some wierd stuff happening with the background colors, with random characters appearing in there....

Also i am seeing strange characters when the MUD is trying to detect client, this MAY be due to the way i have my client detection working...

Am pretty certain clickable MXP linkes USED to work, but they werent actually ending properly.. so it was making everything an MXP link after being set!

The Client is coming along nicely, theres just a few niggles left, but seeing as its only been 2 weeks since its been active, good work! Can't wait to see what else you are going to be doing with it :)

Please Log in or Create an account to join the conversation.

  • plamzi
  • plamzi's Avatar
  • Away
  • Administrator
More
27 Aug 2013 14:44 #34 by plamzi
Replied by plamzi on topic Client Parsing?
Yes, we will be supporting background colors. It would help to get the address of a server that uses them heavily.

Your test MUD seems to be sending links that are not in compliant MXP format. It wraps HTML <a> tags in MXP sequences. The client would understand those only if each < and > is escaped and the MXP wrapper is removed.

Strange characters during detection should go away soon. Client will get better at identifying itself and its MXP version.

There should be no more breaking of ASCII escape sequences, e. g. when you type the "colorlist" command.

Please Log in or Create an account to join the conversation.

More
02 Sep 2013 16:30 #35 by Lyanic
Replied by Lyanic on topic Client Parsing?

Lyanic wrote: As for MXP clickable links: the 'areas' command. However, I think the issue is that MXP still isn't getting negotiated correctly. I'm going to run some tests on my end, and I'll get back to you about that.

Yeah, MXP isn't getting negotiated for 7th Plane. I'm still not sure why. It's possible the issue is partly on my end, but it works fine with all the major desktop clients that support MXP.

Also, when I connect with the MP client now, I get an extraneous 'U' above the client detection line. I'm not sure where that's coming from.

Please Log in or Create an account to join the conversation.

More
02 Sep 2013 18:19 #36 by Tijer
Replied by Tijer on topic Client Parsing?
Lookin good, just a few background colors not working 100%, and also Background 256 colors not working at all!! :) Coming along really nicely tho, MUCH MUCH MUCH better than the FMUD client that people were using to connect to MUDs via websites!

Please Log in or Create an account to join the conversation.

  • plamzi
  • plamzi's Avatar
  • Away
  • Administrator
More
02 Sep 2013 18:25 #37 by plamzi
Replied by plamzi on topic Client Parsing?
Lyanic,

Test MXP negotiation for 7th Plane now?

Tijer,

Which background colors (ANSI) are not working?

Please Log in or Create an account to join the conversation.

More
02 Sep 2013 18:27 #38 by Tijer
Replied by Tijer on topic Client Parsing?
i think its the white colour code being regarded as a dark colour thats causing it to not work properly, as with ansi cant use dark colours with background ansi!!

Please Log in or Create an account to join the conversation.

  • plamzi
  • plamzi's Avatar
  • Away
  • Administrator
More
02 Sep 2013 21:15 #39 by plamzi
Replied by plamzi on topic Client Parsing?

Tijer wrote: i think its the white colour code being regarded as a dark colour thats causing it to not work properly, as with ansi cant use dark colours with background ansi!!


Can you guide me to a specific test case where I can see the problem? Thanks.

Please Log in or Create an account to join the conversation.

More
02 Sep 2013 22:36 #40 by Lyanic
Replied by Lyanic on topic Client Parsing?

plamzi wrote: Lyanic,

Test MXP negotiation for 7th Plane now?

Still no. The extraneous 'U' character is gone, though.

Please Log in or Create an account to join the conversation.