blessed-telnet: termtype.

This commit is contained in:
Christopher Jeffrey 2015-08-06 03:33:00 -07:00
parent d7933adfb0
commit 7e0104ef42
1 changed files with 3 additions and 4 deletions

View File

@ -33,11 +33,10 @@ var server = telnet.createServer(function(client) {
}
});
// XXX For when termtype is implemented in node-telnet
client.on('terminal type', function(data) {
// https://tools.ietf.org/html/rfc884
if (data.command === 'sb' && data.buf[3] === 1) {
var TERM = data.buf.slice(4, -2).toString('ascii');
screen.terminal = TERM;
if (data.command === 'sb' && data.name) {
screen.terminal = data.name;
screen.render();
}
});