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

Allow multiple uses of -c and -s options to built-up an auth string

To solve problem of adding some kind of prefix/tag to a user alias when
connecting to a door server. e.g. ?rlogin server -s [TAG] -s %a

Hopefully you don't need/want a space separating the string elements, as
that's not really doable with this solution.
parent 0a78d39d
Branches
Tags
No related merge requests found
......@@ -2,8 +2,8 @@
// usage: ?rlogin address[:port] [options]
// options:
// -c <client-name> (default: user alias)
// -s <server-name> (default: user real name)
// -c <client-name> (default: user alias) - may be specified multiple
// -s <server-name> (default: user real name) - may be specified multiple
// -t <terminal-type> (e.g. "xtrn=doorcode" to auto-exec door on server)
// -T <connect-timeout-seconds> (default: 10 seconds)
// -m <telnet-gateway-mode> (Number or TG_* vars OR'd together, default: 0)
......@@ -24,8 +24,8 @@ require("sbbsdefs.js", 'TG_RLOGINSWAP');
var mode;
var addr;
var client_name;
var server_name;
var client_name = '';
var server_name = '';
var term_type;
var options;
if((options = load({}, "modopts.js","rlogin")) == null) {
......@@ -78,10 +78,10 @@ for(var i = 0; i < argv.length; i++) {
var value = arg.length > 2 ? arg.substring(2) : argv[++i];
switch(arg[1]) { // value options
case 'c':
client_name = value;
client_name += value;
break;
case 's':
server_name = value;
server_name += value;
break;
case 't':
term_type = value;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment