mirror of
https://github.com/lalbornoz/roar.git
synced 2024-11-23 07:36:37 +00:00
js/lex.js: default to {bg,fg} when encoding to mIRC.
This commit is contained in:
parent
3937d2b3dd
commit
40a95d41cd
@ -54,9 +54,6 @@ Lex.prototype.mirc = function(){
|
|||||||
if ((lastBg == this.fg) && (lastFg == this.bg)) {
|
if ((lastBg == this.fg) && (lastFg == this.bg)) {
|
||||||
lastBg = this.bg; lastFg = this.fg
|
lastBg = this.bg; lastFg = this.fg
|
||||||
return "\x16" + char
|
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)) {
|
} else if ((lastBg != this.bg) && (lastFg == this.fg)) {
|
||||||
lastBg = this.bg
|
lastBg = this.bg
|
||||||
return "\x03," + ((this.bg&15) < 10 && !charIsNaN ? "0" : "") + (this.bg&15) + char
|
return "\x03," + ((this.bg&15) < 10 && !charIsNaN ? "0" : "") + (this.bg&15) + char
|
||||||
@ -64,7 +61,8 @@ Lex.prototype.mirc = function(){
|
|||||||
lastFg = this.fg
|
lastFg = this.fg
|
||||||
return "\x03" + ((this.fg&15) < 10 && !charIsNaN ? "0" : "") + (this.fg&15) + char
|
return "\x03" + ((this.fg&15) < 10 && !charIsNaN ? "0" : "") + (this.fg&15) + char
|
||||||
} else {
|
} 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(){
|
Lex.prototype.ansi = function(){
|
||||||
|
Loading…
Reference in New Issue
Block a user