FruitieX / teleirc

A simple Telegram ↔ IRC gateway.
MIT License
272 stars 88 forks source link

colored messages are neither stripped out, nor correctly passed #65

Closed lagleki closed 8 years ago

lagleki commented 8 years ago

How to add color to IRC messages: http://www.mirc.com/colors.html

So when typing ^C5,12colored text and background the result in Telegram is "5,12colored text and background". They are sent to Telegram as "\u000312" etc. I think we should remove them.

FruitieX commented 8 years ago

Yes, these should be stripped out. I'm sure it's possible to scan each message for the ^C character and then remove the following few characters (how are the color codes separated from the text, is it always a one digit number, comma, two digit number?)

lagleki commented 8 years ago

No, the comma is not necessary. The syntax is ^CN[,M].

This might help: https://github.com/erming/shout/issues/210#issuecomment-58054600

FruitieX commented 8 years ago

Ah, that is helpful indeed thanks. If someone wants to implement this go ahead, otherwise I'll handle it during the coming weeks when I'm less busy hopefully :)

albert-- commented 8 years ago

You could also just set stripColors to truein your config file under config.ircOptions

FruitieX commented 8 years ago

Ah perfect, that's what we will do.