|
momoxhemo Newbie
Joined: 07 Feb 2014 Posts: 1
|
Posted: Fri Feb 07, 2014 10:32 pm
Custom MUD telnet commands |
So this is an example of 2 RAW lines that my MUD is sending me:
The MUD is using 27 telnet control code or <ESC> to signal color commands. The rgb color is withing the <> and it applies to everything to the right of it until there is a different <ESC> code. If I uncheck "emulate control codes," I can manually create substitutions and coloring of text and such, but I also have to deal with some other issues like weird looking echos and stuff. If this option is not set, this is the output from the above lines that is fed to the screen:
As you can see, CMUD is using the <ESC> character to delete the letter to the right of in and then passing everything through as is. While I do have a workaround, I believe it's not ideal at all processing wise as it fires 20 triggers for 1 line of text. What can I do to make this display properly for me?
<Edited out mud output as 3rd party clients are banned from game> |
|
Last edited by momoxhemo on Sat Feb 08, 2014 5:42 pm; edited 1 time in total |
|
|
|
shalimar GURU
Joined: 04 Aug 2002 Posts: 4690 Location: Pensacola, FL, USA
|
Posted: Sat Feb 08, 2014 4:35 am |
you could try using #SUB to replace the color codes with a comparative <color=dodgerblue>spiffy item</color> MXP style color codes
|
|
_________________ Discord: Shalimarwildcat |
|
|
|
MattLofton GURU
Joined: 23 Dec 2000 Posts: 4834 Location: USA
|
Posted: Sat Feb 08, 2014 5:39 am |
What you are seeing is called the C1 control code, which is the start of any ansi sequence. For muds, you will see <ESC>[ which is the C1 control code known as Control Sequence Initiator (this one governs stuff like color and style as well as cursor control). Everything after the C1 control code are the (optional) parameters for that control code. For example, 4;1;33m indicates that we wish to color the foreground yellow (33) with bright intensity (1) and underline (4) using the Select Graphic Rendition (m). From what I can see in the documentation, it appears that almost all of the codes are designed for printers and might not have any meaning in the context of your computer monitor so even if matched they probably would appear to do nothing anyways.
It's possible that CMud is checking for C1 control codes in a case-insensitive manner, and in that case it's probably found <ESC>C (the control code that prevents a word from being broken up due to word wrapping) in the form of <ESC>c. There are no parameters for this code, but at any rate the i=#,#,#<ESC> stuff that comes after wouldn't be recognized as valid to begin with. You can probably turn off ANSI Color emulation in Preferences, but I dunno what affect that'd have on the text-formatting functionality like %ansi(), #cw, or mxp.
Regardless, you won't be able to escape the frequent triggering so your best bet will be to either use a different client that can understand this custom syntax or build an external plugin/proxy app to preprocess the incoming datastream. |
|
_________________ EDIT: I didn't like my old signature |
|
|
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|