Skip to content
Snippets Groups Projects
Commit 2c319855 authored by Rob Swindell's avatar Rob Swindell :speech_balloon:
Browse files

Fix the mode passing to bbs.telnet_gate() - never undefined value

bbs.telnet_gate() is not tolerant of receiving an undefined parameter value
(while bbs.rlogin_gate() is), so this messed up the subsequent argument
parsing which caused the strings pushed with the '-s' or '-S' options to
not work.

Fixes issue #774
parent c286eb9f
No related branches found
No related tags found
1 merge request!455Update branch with changes from master
......@@ -24,7 +24,7 @@ load("sbbsdefs.js");
var quiet = false;
var pause = true;
var clear = true;
var mode;
var mode = 0;
var addr;
var timeout = 10;
var send = [];
......@@ -35,7 +35,7 @@ for(var i = 0; i < argv.length; i++) {
if(!addr)
addr = arg;
else if(!mode)
mode = arg;
mode = eval(arg);
else {
alert(js.exec_file + ": Unexpected argument: " + arg);
exit(1);
......@@ -59,7 +59,7 @@ for(var i = 0; i < argv.length; i++) {
timeout = Number(value);
break;
case 'm':
mode = value;
mode = eval(value);
break;
case 's':
send.push(value);
......@@ -83,7 +83,6 @@ if(!quiet) {
writeln("\x01h\x01yConnecting to: \x01w" + addr + "\x01n");
}
mode = eval(mode);
var result = bbs.telnet_gate(addr, mode, timeout, send);
if(result === false)
alert(js.exec_file + ": Failed to connect to: " + addr);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment