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 ➜ Plugins ➜ NoAnsi Leftovers

NoAnsi Leftovers

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


Posted by Xvordan   (29 posts)  Bio
Date Wed 20 Aug 2014 01:39 AM (UTC)
Message
I'm trying to use the No Ansi plugin on a mud that rather religiously uses Ansi, and while that's ok, I prefer to format and colour things myself.

My problem is that the No Ansi plugin strips the ansi character, but returns the parameters, so I get things like:
36mObvious exits:

I'm drawing a blank on the best way to address this. It looks like the mushclient function just the basics by removing the ansi anchor, leaving the rest of the text. How can I make it strip the entire sequence? It's something like \\a36m
Top

Posted by Nick Gammon   Australia  (23,133 posts)  Bio   Forum Administrator
Date Reply #1 on Wed 20 Aug 2014 01:48 AM (UTC)
Message
Do you mean this one?

http://www.gammon.com.au/forum/bbshowpost.php?bbsubject_id=7894

That seemed to work OK for me.

Quote:

It's something like \\a36m


That doesn't look like ANSI to me.

An ANSI sequence is something like: ESC [36m

So there should be an "escape" character and a square bracket.

Can you capture one of these sequences with "packet debug"? (Edit menu -> Debug packets).

Paste the resulting packet into your reply. Don't forget to turn packet debug off afterwards.

- Nick Gammon

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

Posted by Xvordan   (29 posts)  Bio
Date Reply #2 on Wed 20 Aug 2014 08:11 AM (UTC)
Message
It is that very plugin you linked to, yes. And my bad. I just used the \a for the Ansi symbol since I didn't know how to represent the escape char for ansi on the forum.

Interestingly, No Ansi takes care of the login screen's ansi just fine, but it then fails to do so on text thereafter, such as room descriptions. Here's a packet debug from Awake:

Incoming packet: 6 (688 bytes) at Wednesday, August 20, 2014, 2:03:03 AM

.[1;36mNorth Mai   1b 5b 31 3b 33 36 6d 4e 6f 72 74 68 20 4d 61 69
n & Little.[0m.[   6e 20 26 20 4c 69 74 74 6c 65 1b 5b 30 6d 1b 5b
0m...[0m   North   30 6d 0d 0a 1b 5b 30 6d 20 20 20 4e 6f 72 74 68
 Main cuts acros   20 4d 61 69 6e 20 63 75 74 73 20 61 63 72 6f 73
s the northern e   73 20 74 68 65 20 6e 6f 72 74 68 65 72 6e 20 65
dge of the city    64 67 65 20 6f 66 20 74 68 65 20 63 69 74 79 20
of Tacoma.  It i   6f 66 20 54 61 63 6f 6d 61 2e 20 20 49 74 20 69
s a..busy street   73 20 61 0d 0a 62 75 73 79 20 73 74 72 65 65 74
, though not wor   2c 20 74 68 6f 75 67 68 20 6e 6f 74 20 77 6f 72
thy of being dub   74 68 79 20 6f 66 20 62 65 69 6e 67 20 64 75 62
bed the 'main' s   62 65 64 20 74 68 65 20 27 6d 61 69 6e 27 20 73
treet, as it is    74 72 65 65 74 2c 20 61 73 20 69 74 20 69 73 20
in..all actualit   69 6e 0d 0a 61 6c 6c 20 61 63 74 75 61 6c 69 74
y, a rather mino   79 2c 20 61 20 72 61 74 68 65 72 20 6d 69 6e 6f
r sidestreet tha   72 20 73 69 64 65 73 74 72 65 65 74 20 74 68 61
t sees moderate    74 20 73 65 65 73 20 6d 6f 64 65 72 61 74 65 20
traffic for the.   74 72 61 66 66 69 63 20 66 6f 72 20 74 68 65 0d
.city.  Little R   0a 63 69 74 79 2e 20 20 4c 69 74 74 6c 65 20 52
oad is a sleazy    6f 61 64 20 69 73 20 61 20 73 6c 65 61 7a 79 20
road, despite it   72 6f 61 64 2c 20 64 65 73 70 69 74 65 20 69 74
s proximity to t   73 20 70 72 6f 78 69 6d 69 74 79 20 74 6f 20 74
he Night of..Rag   68 65 20 4e 69 67 68 74 20 6f 66 0d 0a 52 61 67
e memorial, that   65 20 6d 65 6d 6f 72 69 61 6c 2c 20 74 68 61 74
 ends southwards   20 65 6e 64 73 20 73 6f 75 74 68 77 61 72 64 73
 on Interstate 5   20 6f 6e 20 49 6e 74 65 72 73 74 61 74 65 20 35
, where it ends    2c 20 77 68 65 72 65 20 69 74 20 65 6e 64 73 20
at a..half-clove   61 74 20 61 0d 0a 68 61 6c 66 2d 63 6c 6f 76 65
rleaf highway ju   72 6c 65 61 66 20 68 69 67 68 77 61 79 20 6a 75
nction.  The sme   6e 63 74 69 6f 6e 2e 20 20 54 68 65 20 73 6d 65
ll of poorly tre   6c 6c 20 6f 66 20 70 6f 6f 72 6c 79 20 74 72 65
ated sewage fill   61 74 65 64 20 73 65 77 61 67 65 20 66 69 6c 6c
s..the air, the    73 0d 0a 74 68 65 20 61 69 72 2c 20 74 68 65 20
notorious Tacoma   6e 6f 74 6f 72 69 6f 75 73 20 54 61 63 6f 6d 61
 Aroma. ...[0m.[   20 41 72 6f 6d 61 2e 20 0d 0a 1b 5b 30 6d 1b 5b
0;36mObvious exi   30 3b 33 36 6d 4f 62 76 69 6f 75 73 20 65 78 69
ts:...[0m.[0;36m   74 73 3a 0d 0a 1b 5b 30 6d 1b 5b 30 3b 33 36 6d
North - VS&I Ter   4e 6f 72 74 68 20 2d 20 56 53 26 49 20 54 65 72
minals...[0;36mE   6d 69 6e 61 6c 73 0d 0a 1b 5b 30 3b 33 36 6d 45
ast  - North Mai   61 73 74 20 20 2d 20 4e 6f 72 74 68 20 4d 61 69
n...[0;36mSouth    6e 0d 0a 1b 5b 30 3b 33 36 6d 53 6f 75 74 68 20
- Little Road...   2d 20 4c 69 74 74 6c 65 20 52 6f 61 64 0d 0a 1b
[0;36mWest  - No   5b 30 3b 33 36 6d 57 65 73 74 20 20 2d 20 4e 6f
rth Main...[0m..   72 74 68 20 4d 61 69 6e 0d 0a 1b 5b 30 6d 0d 0a
Top

Posted by Fiendish   USA  (2,534 posts)  Bio   Global Moderator
Date Reply #3 on Wed 20 Aug 2014 02:38 PM (UTC)

Amended on Wed 20 Aug 2014 02:39 PM (UTC) by Fiendish

Message
Are you using at least version 4.93?

http://www.gammon.com.au/scripts/showrelnote.php?version=4.93&productid=0

https://github.com/fiendish/aardwolfclientpackage
Top

Posted by Nick Gammon   Australia  (23,133 posts)  Bio   Forum Administrator
Date Reply #4 on Wed 20 Aug 2014 07:34 PM (UTC)
Message
Fiendish spotted the problem. Version 4.93 fixed a problem (which he reported) in StripANSI.

Using 4.94 it converts OK:


North Main & Little
   North Main cuts across the northern edge of the city of Tacoma.  It is a
busy street, though not worthy of being dubbed the 'main' street, as it is in
all actuality, a rather minor sidestreet that sees moderate traffic for the
city.  Little Road is a sleazy road, despite its proximity to the Night of
Rage memorial, that ends southwards on Interstate 5, where it ends at a
half-cloverleaf highway junction.  The smell of poorly treated sewage fills
the air, the notorious Tacoma Aroma. 
Obvious exits:
North - VS&I Terminals
East  - North Main
South - Little Road
West  - North Main

- Nick Gammon

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

Posted by Xvordan   (29 posts)  Bio
Date Reply #5 on Fri 29 Aug 2014 08:21 AM (UTC)
Message
Just wanted to touch back and thank you Nick and Fiendish for the upgrade suggestion. I'd been using a customized package of MUSHClient that was out of date (4.84). Updating to 4.94 did indeed fix the problem.
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.


19,396 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.