Anope IRC Services

Please login or register.

Login with username, password and session length
Advanced search  

News:

Pages: [1]   Go Down

Author Topic: IRC Colour Codes and xmlrpc  (Read 3401 times)

0 Members and 1 Guest are viewing this topic.

Craig Fairhurst

  • Anope User
  • Offline Offline
  • Posts: 28
IRC Colour Codes and xmlrpc
« 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
« Last Edit: December 22, 2014, 12:48:31 AM by Craig Fairhurst »
Logged

Craig Fairhurst

  • Anope User
  • Offline Offline
  • Posts: 28
Re: IRC Colour Codes and xmlrpc
« Reply #1 on: December 22, 2014, 12:14:06 AM »

I suppose for channel topics this would be a factor too....
Pages: [1]   Go Up