Anope IRC Services

Anope Support => 2.0.x/1.9.x Support => Topic started by: Craig Fairhurst on December 22, 2014, 12:08:49 AM

Title: IRC Colour Codes and xmlrpc
Post by: Craig Fairhurst on December 22, 2014, 12:08:49 AM
hi guys

I am sure some of you have played with irc bots in the past and one neat feature of PHP is the ability to colour code text using for example \x030,4 which would create white text on a red background.
However when sending the codes using xmlrpc some conversion is done on the backslash and the colour codes are ignored. I've tried encapsulating in single quotes (typically would mean the colour codes are ignored by the PHP parser) to no avail.

So the big mystery is, how do you send colour codes to the xmlrpc web service?


edit:

to be clearer, there was confusion on IRC

Code: [Select]
$anope->DoCommand('BotServ', 'nickname', "SAY #channel \x030,4\x02 this is bold white text on a red background “);
should produce:
this is bold white text on a red background (with the right colours)
but it produces:
0,4 this is bold white text on a red background
Title: Re: IRC Colour Codes and xmlrpc
Post by: Craig Fairhurst on December 22, 2014, 12:14:06 AM
I suppose for channel topics this would be a factor too....