More ANSI-BBS compliant... still some to go
This commit is contained in:
parent
bbae082f7d
commit
1e6c577cd3
|
@ -50,12 +50,17 @@ class TelnetClient {
|
|||
this.emit('end');
|
||||
});
|
||||
|
||||
// :TODO: handle 'command error' event
|
||||
this.socket.on('command error', (command, err) => {
|
||||
this._logDebug({ command, error : err.message }, 'Command error');
|
||||
});
|
||||
|
||||
this.socket.on('DO', command => {
|
||||
switch (command.option) {
|
||||
case Options.ECHO :
|
||||
return this.socket.will.echo();
|
||||
case Options.SGA :
|
||||
return this.socket.will.sga();
|
||||
|
||||
case Options.TRANSMIT_BINARY :
|
||||
return this.socket.will.transmit_binary();
|
||||
|
||||
default :
|
||||
return this.socket.command(Commands.WONT, command.option);
|
||||
|
@ -68,9 +73,6 @@ class TelnetClient {
|
|||
|
||||
this.socket.on('WILL', command => {
|
||||
switch (command.option) {
|
||||
case Options.LINEMODE :
|
||||
return this.socket.dont.linemode();
|
||||
|
||||
case Options.TTYPE :
|
||||
return this.socket.sb.send.ttype();
|
||||
|
||||
|
@ -197,7 +199,6 @@ class TelnetClient {
|
|||
}
|
||||
|
||||
banner() {
|
||||
this.socket.do.echo();
|
||||
this.socket.will.echo(); // we'll echo back
|
||||
|
||||
this.socket.will.sga();
|
||||
|
|
Loading…
Reference in New Issue