Only disable local echo if server is doing echo.

This makes the client usable for other plain text services that telnet
clients can normally communicate with (IRC, SMTP, etc).
This commit is contained in:
Joel Martin 2011-01-13 12:19:47 -06:00
parent a2c5fa3905
commit f7e1a711db
2 changed files with 3 additions and 4 deletions

View File

@ -86,6 +86,8 @@ function do_recv() {
case 251: // WILL
Util.Debug("Got Cmd WILL '" + value + "'");
if (value === 1) {
// Server will echo, turn off local echo
vt100.noecho();
// Affirm echo with DO
Util.Info("Send Cmd DO '" + value + "' (echo)");
sQ.push(255, 253, value);
@ -206,9 +208,6 @@ function constructor() {
vt100 = new VT100(80, 24, target);
// Turn off local echo
vt100.noecho();
/*
* Override VT100 I/O routines

View File

@ -1,7 +1,7 @@
<html>
<head>
<title>WebSockets Telnet</title>
<title>Telnet client using WebSockets</title>
<script src="include/base64.js"></script>
<script src="include/websock.js"></script>
<script src="include/util.js"></script>