Skip to content
This repository has been archived by the owner on Jan 28, 2021. It is now read-only.

Commit

Permalink
Ugly fix for now re: determining address to telnet to. Untested, migh…
Browse files Browse the repository at this point in the history
…t work.
  • Loading branch information
echicken committed Feb 1, 2018
1 parent db33807 commit b74a348
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions mods/websocket-telnet-service.js
Expand Up @@ -229,10 +229,11 @@ try {
var ini = f.iniGetObject('BBS');
f.close();

if (typeof ini.TelnetInterface === 'undefined' || ini.TelnetInterface === '0.0.0.0') {
var telnet_addr = '127.0.0.1';
if (typeof ini.TelnetInterface === 'undefined') {
var telnet_addr = 'localhost';
} else {
var telnet_addr = ini.TelnetInterface;
var telnet_addr = ini.TelnetInterface.split(/,/)[0];
if (parseInt(telnet_addr.replace(/[^\d]/g, '') == 0)) telnet_addr = 'localhost';
}

var wss = new WebSocketProxy(client);
Expand Down

0 comments on commit b74a348

Please sign in to comment.