From 44e4b02068c1d1a28bbf2f2b8be25ae21dc46f9a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lucio=20Andr=C3=A9s=20Illanes=20Albornoz?= Date: Wed, 24 Oct 2018 19:04:37 +0200 Subject: [PATCH] js/lex.js: default to {bg,fg} when encoding to mIRC. --- js/lex.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/js/lex.js b/js/lex.js index 9d170bb..aa1a889 100644 --- a/js/lex.js +++ b/js/lex.js @@ -54,9 +54,6 @@ Lex.prototype.mirc = function(){ if ((lastBg == this.fg) && (lastFg == this.bg)) { lastBg = this.bg; lastFg = this.fg return "\x16" + char - } else if ((lastBg != this.bg) && (lastFg != this.fg)) { - lastBg = this.bg; lastFg = this.fg - return "\x03" + (this.fg&15) + "," + ((this.bg&15) < 10 && !charIsNaN ? "0" : "") + (this.bg&15) + char } else if ((lastBg != this.bg) && (lastFg == this.fg)) { lastBg = this.bg return "\x03," + ((this.bg&15) < 10 && !charIsNaN ? "0" : "") + (this.bg&15) + char @@ -64,7 +61,8 @@ Lex.prototype.mirc = function(){ lastFg = this.fg return "\x03" + ((this.fg&15) < 10 && !charIsNaN ? "0" : "") + (this.fg&15) + char } else { - return "\x03" + "0,1" + lastBg = this.bg; lastFg = this.fg + return "\x03" + (this.fg&15) + "," + ((this.bg&15) < 10 && !charIsNaN ? "0" : "") + (this.bg&15) + char } } Lex.prototype.ansi = function(){