Skip to content
Snippets Groups Projects
Commit 8e26e7af authored by echicken's avatar echicken
Browse files

Some "fixes" for determining appropriate telnet/rlogin address to connect to.

parent 97ecde70
No related branches found
No related tags found
No related merge requests found
...@@ -406,10 +406,12 @@ try { ...@@ -406,10 +406,12 @@ try {
var ini = f.iniGetObject('BBS'); var ini = f.iniGetObject('BBS');
f.close(); f.close();
if (typeof ini.RLoginInterface === 'undefined' || ini.RLoginInterface === '0.0.0.0') { if (typeof ini.RLoginInterface === 'undefined') {
var rlogin_addr = '127.0.0.1'; var rlogin_addr = '127.0.0.1';
} else { } else {
var rlogin_addr = ini.RLoginInterface; var rlogin_addr = ini.RLoginInterface.split(/,/)[0];
var ra = parseInt(rlogin_addr.replace(/[^\d]/g, ''));
if (isNaN(ra) || ra == 0) rlogin_addr = '127.0.0.1';
} }
rlogin = new RLoginClient( rlogin = new RLoginClient(
......
...@@ -229,10 +229,12 @@ try { ...@@ -229,10 +229,12 @@ try {
var ini = f.iniGetObject('BBS'); var ini = f.iniGetObject('BBS');
f.close(); f.close();
if (typeof ini.TelnetInterface === 'undefined' || ini.TelnetInterface === '0.0.0.0') { if (typeof ini.TelnetInterface === 'undefined') {
var telnet_addr = '127.0.0.1'; var telnet_addr = '127.0.0.1';
} else { } else {
var telnet_addr = ini.TelnetInterface; var telnet_addr = ini.TelnetInterface.split(/,/)[0];
var ta = parseInt(telnet_addr.replace(/[^\d]/g, '') == 0);
if (isNaN(ta) || ta == 0) telnet_addr = '127.0.0.1';
} }
var wss = new WebSocketProxy(client); var wss = new WebSocketProxy(client);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment