Skip to content
Snippets Groups Projects
Commit 5faf70b3 authored by Rob Swindell's avatar Rob Swindell :speech_balloon:
Browse files

Merge branch 'eugeneso/irc_color_fix' into 'master'

Fix handling of IRC color control sequences

See merge request !153
parents ceb01048 3514fdf4
No related branches found
No related tags found
2 merge requests!463MRC mods by Codefenix (2024-10-20),!153Fix handling of IRC color control sequences
......@@ -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";
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment