diff --git a/core/servers/login/telnet.js b/core/servers/login/telnet.js index 7bb938a4..318dd9fc 100644 --- a/core/servers/login/telnet.js +++ b/core/servers/login/telnet.js @@ -24,8 +24,8 @@ class TelnetClient { constructor(socket) { Client.apply(this, socket, socket); - this.setInputOutput(socket, socket); this.socket = new TelnetSocket(socket); + this.setInputOutput(this.socket, this.socket); // // Wait up to 3s to hear about from our terminal type request @@ -50,6 +50,8 @@ class TelnetClient { this.emit('end'); }); + // :TODO: handle 'command error' event + this.socket.on('DO', command => { switch (command.option) { case Options.ECHO : @@ -178,6 +180,14 @@ class TelnetClient { }); } + get dataPassthrough() { + return this.socket.passthrough; + } + + set dataPassthrough(passthrough) { + this.socket.passthrough = passthrough; + } + disconnect() { try { return this.socket.rawSocket.end();