Register forum user name Search FAQ

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, confirm your email, resolve issues, 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.

Due to spam on this forum, all posts now need moderator approval.

 Entire forum ➜ MUSHclient ➜ General ➜ Issue? Displaying different colors?

Issue? Displaying different colors?

It is now over 60 days since the last post. This thread is closed.     Refresh page


Posted by Zeno   USA  (2,871 posts)  Bio
Date Fri 04 Jan 2008 09:30 PM (UTC)

Amended on Sat 05 Jan 2008 07:14 PM (UTC) by Nick Gammon

Message
For this image:
http://img.photobucket.com/albums/v123/rebirthseph/mc_color_bleed.jpg
You will notice the room title (the second time) is dark red. All room titles in the MUD are bright red, and I am trying to figure out why it displayed as dark red. Yes, there was a color bleed. But it should stop as soon as another color is used.

Here is the debug data:
1;35m76.[1;34m/.   31 3b 33 35 6d 37 36 1b 5b 31 3b 33 34 6d 2f 1b
 [1;35m315.[0;34m   5b 31 3b 33 35 6d 33 31 35 1b 5b 30 3b 33 34 6d
 ] .[1;33mReserve   5d 20 1b 5b 31 3b 33 33 6d 52 65 73 65 72 76 65
 .[0;33m:.[0;34m[   1b 5b 30 3b 33 33 6d 3a 1b 5b 30 3b 33 34 6d 5b
 .[1;31m0.[0;34m]   1b 5b 31 3b 33 31 6d 30 1b 5b 30 3b 33 34 6d 5d
  .[1;37m>          20 1b 5b 31 3b 33 37 6d 3e 
   
 Sent  packet: 610 (3 bytes) 
   
 w..                77 0d 0a 
   
 Incoming packet: 1768 (999 bytes) 
   
 .[1;31mSakuragaw   1b 5b 31 3b 33 31 6d 53 71 6b 75 72 61 67 61 77
 a: 4th Lane...[0   61 3a 20 34 74 68 20 4c 61 6e 65 0a 0d 1b 5b 30
 ;37mAs the 4th L   3b 33 37 6d 41 73 20 74 68 65 20 34 74 68 20 4c
 ane of Sakuragaw   61 6e 65 20 6f 66 20 53 61 6b 75 72 61 67 61 77
 a continues traf   61 20 63 6f 6e 74 69 6e 75 65 73 20 74 72 61 66
 fic seems to eas   66 69 63 20 73 65 65 6d 73 20 74 6f 20 65 61 73
 e up. ..However,   65 20 75 70 2e 20 0a 0d 48 6f 77 65 76 65 72 2c


Any clues as to why the room name was displayed dark red?

[EDIT] Hmm, seems the player had debug and gotten the wrong data (4th lane?). Still a color issue though, hmm.

Edited by Nick to add backslashes to brackets.

Zeno McDohl,
Owner of Bleached InuYasha Galaxy
http://www.biyg.org
Top

Posted by Nick Gammon   Australia  (23,133 posts)  Bio   Forum Administrator
Date Reply #1 on Sat 05 Jan 2008 07:53 PM (UTC)

Amended on Sun 06 Jan 2008 04:00 AM (UTC) by Nick Gammon

Message
To make it easier to analyze your data I wrote a small script to convert the escape character to printable form:


s = utils.fromhex [[
31 3b 33 35 6d 37 36 1b 5b 31 3b 33 34 6d 2f 1b
5b 31 3b 33 35 6d 33 31 35 1b 5b 30 3b 33 34 6d
5d 20 1b 5b 31 3b 33 33 6d 52 65 73 65 72 76 65
1b 5b 30 3b 33 33 6d 3a 1b 5b 30 3b 33 34 6d 5b
1b 5b 31 3b 33 31 6d 30 1b 5b 30 3b 33 34 6d 5d
20 1b 5b 31 3b 33 37 6d 3e 
1b 5b 31 3b 33 31 6d 53 71 6b 75 72 61 67 61 77
61 3a 20 34 74 68 20 4c 61 6e 65 0a 0d 1b 5b 30
3b 33 37 6d 41 73 20 74 68 65 20 34 74 68 20 4c
61 6e 65 20 6f 66 20 53 61 6b 75 72 61 67 61 77
61 20 63 6f 6e 74 69 6e 75 65 73 20 74 72 61 66
66 69 63 20 73 65 65 6d 73 20 74 6f 20 65 61 73
65 20 75 70 2e 20 0a 0d 48 6f 77 65 76 65 72 2c
]]

t = { ["\027"] = "<esc>",
      ["\013"] = "<cr>",
    }

print (string.gsub (s, ".", t))



The hex codes I got from your post, discarding the ASCII stuff at the start of the lines.

This is the result of running that:


1;35m76<esc>[1;34m/<esc>[1;35m315<esc>[0;34m] 
<esc>[1;33mReserve<esc>[0;33m:<esc>[0;34m[<esc>[1;31m0<esc>[0;34m] 
<esc>[1;37m><esc>[1;31mSqkuragawa: 4th Lane

<cr><esc>[0;37mAs the 4th Lane of Sakuragawa continues traffic seems to ease up. 

<cr>However,


First, there is something funny there. On the first line of packet 1768 there is the word "Sakuragawa", however you can see from my debug script that it is really "Sqkuragawa". You can see from further down in that packet that hex "53 61 6b" is "Sak", and near the start of the packet you have "53 71 6b" which is "Sqk". This makes me wonder if the packet has been doctored a bit. ;)

Putting that aside for the moment, the start of that line appears to be: <esc>[1;31mSqkuragawa

This is "turn on bold" (the 1) and "text red" (the 31), so that should have shown in bold red.

I don't see why it didn't in this case, however I don't think your packet exactly matches the screen capture that shows the erroneous display.


- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Nick Gammon   Australia  (23,133 posts)  Bio   Forum Administrator
Date Reply #2 on Sat 05 Jan 2008 07:57 PM (UTC)
Message
One suggestion I have is to thrown in an ANSI reset, at the start of a room name. In other words, change:

<esc>[1;37m

to

<esc>[0;1;37m

- Nick Gammon

www.gammon.com.au, www.mushclient.com
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.


7,542 views.

It is now over 60 days since the last post. This thread is closed.     Refresh page

Go to topic:           Search the forum


[Go to top] top

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.