mirror of
https://github.com/lalbornoz/roar.git
synced 2024-12-23 04:46:37 +00:00
js/lex.js: default to {bg,fg} when encoding to mIRC.
This commit is contained in:
parent
21526e2421
commit
44e4b02068
@ -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(){
|
||||
|
Loading…
Reference in New Issue
Block a user