* Try to handle socket error

* Fix bug in wrapping with MultiLineEditText
* Updates on message base DB layout/triggers
* Detect some terminals via ANSI DSR for device attributes (WIP)
This commit is contained in:
Bryan Ashby 2015-07-06 22:37:11 -06:00
parent 2b963ce6f9
commit 40e0b55424
7 changed files with 83 additions and 11 deletions

View file

@ -30,6 +30,7 @@ function ClientTerminal(output) {
var termType = 'unknown';
var termHeight = 0;
var termWidth = 0;
var termClient = 'unknown';
// Raw values set by e.g. telnet NAWS, ENVIRONMENT, etc.
this.env = {};
@ -64,9 +65,11 @@ function ClientTerminal(output) {
// SCOANSI
// VT100
// XTERM
// * PuTTY
// LINUX
// QNX
// SCREEN
// * ConnectBot
//
if(this.isANSI()) {
this.outputEncoding = 'cp437';
@ -75,6 +78,10 @@ function ClientTerminal(output) {
this.outputEncoding = 'utf8';
}
// :TODO: according to this: http://mud-dev.wikidot.com/article:telnet-client-identification
// Windows telnet will send "VTNT". If so, set termClient='windows'
// there are some others on the page as well
Log.debug( { encoding : this.outputEncoding }, 'Set output encoding due to terminal type change');
}
});
@ -100,6 +107,17 @@ function ClientTerminal(output) {
}
}
});
Object.defineProperty(this, 'termClient', {
get : function() {
return termClient;
},
set : function(tc) {
termClient = tc;
Log.debug( { termClient : this.termClient }, 'Set known terminal client');
}
});
}
ClientTerminal.prototype.isANSI = function() {