Additional info on this topic.

You may find this script not working as intended, due to a default setting that many other users may have. Someone came into the help channel with a problem, where he had a channel that he didn't see any color in it, but someone else sent a screenshot showing that the topic did have color.

It turns out that the default setting for mIRC is to hide colors from people if there's too many of them. In options/irc/messages "strip codes from incoming messages", the default settings for that row is to strip color and the other control codes if there's more than 50 of them in the message. This next command sends 50 characters, each in a different color, and under the default setting, other people will see all the colors.

//say $regsubex($str(x,50),/x/g,$chr(3) $+ $base(\n,10,10,2) $+ $chr($calc(64+ \n)))

But if you change the 50 to 51, that causes there to be 'more than 50 control codes', and they'll be stripped from the incoming message, and they'll see this as if no colors were used.

So that means your script works for short messages, but if the string is long enough that it needs 50 colors, sorry charlie frown

You won't see anything unusual in channel messages, but if you

//query $me

you'll see the colors stripped out of the message when the 51 is used instead of 50

--

I'm not so sure there's a need for this default setting anymore, because modern networks now give channels the tools to deal with colors if they consider them a problem. There's now channelmode +c that blocks the message if it contains any colors, and +S that allows the message after stripping the colors. So if the channel has either of these 2 messages, your script also fails.