Commit 5faf70b3 authored by Rob Swindell's avatar Rob Swindell 💬
Browse files

Merge branch 'eugeneso/irc_color_fix' into 'master'

Fix handling of IRC color control sequences

See merge request !153
parents ceb01048 3514fdf4
......@@ -1109,7 +1109,7 @@ function Screen_print_line(line) {
codes.shift();
p2=codes[0];
codes.shift();
ending=","+codes.join(",");
ending=codes.join(",");
if(p2==undefined) {
p2="-1";
}
......@@ -1213,6 +1213,8 @@ function Screen_print_line(line) {
return ret+ending;
}
);
// Empty color code means remove all color formatting
line=line.replace(/\x03/g,DEFAULT_COLOR);
if(line.length > 78) {
// Word Wrap...
for(var j=0;j<=line.length;j++) {
......
var DEFAULT_COLOR= "\x01N\x01W";
var FROM_NICK_CURCHAN= "\x01N\x01B<\x01N\x01W%s\x01N\x01B>\x01N\x01W";
var FROM_NICK_OUTSIDE= "\x01N\x01B<\x01N\x01W%s\x01N\x01B>\x01N\x01W";
var JOIN_FORMAT= "\x01N\x01C%s (%s) has joined %s";
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment