

Moving it under to the ansi2decho higher scope would solve my problem right away as its content wouldn't be wiped out on each closure call.
#Mudlet echo how to
Extra information, such as Mudlet revision/repo/branch, operating system and ideas for how to solve / implementĪ naive implementation of the functionality would be to simply move the coloursToUse local variable to a higher scope, as right now it is a local for the callback. I don't know what GRMC mode the rest of the muds use (are they not using cumulative?) but the ideal scenario would be to choose how you want the function to behave and get the output prepared for that mode. This might seem like a small nuisance, but it forces me to rewrite a custom ansi2decho function for my mud, as right now I can't echo bold text to miniconsoles. Obviously you can't combine two colours and only the last one would prevail, but you can combine a bold tag with a following colour tag to create a bold colour.

I'm not that familiar with ECMA-48 standard -maybe some of you are and can shed some light into this-, but if I read it correctly, the difference between them lies in that upon two consecutive ANSI SGR codes, replacing mode overrides the first with the second, while cumulative mode tries to combine them both. Right now ansi2decho performs a regex split and then subs every escape character to their decho colour equivalent, which is enough for GRCM muds on replacing mode, but not for those who are using cumulative mode. Add suport in the ansi2decho lua function for muds which use GRCM on cumulative mode for their ANSI color escapes.
