From 7e0104ef425ac32ae81fefb6f3f2c84f6293b5d5 Mon Sep 17 00:00:00 2001 From: Christopher Jeffrey Date: Thu, 6 Aug 2015 03:33:00 -0700 Subject: [PATCH] blessed-telnet: termtype. --- example/blessed-telnet.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/example/blessed-telnet.js b/example/blessed-telnet.js index 78975c6..e95a19f 100755 --- a/example/blessed-telnet.js +++ b/example/blessed-telnet.js @@ -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(); } });