From d54338c46e8df77b7d8b0c996849b8eba73dc07b Mon Sep 17 00:00:00 2001 From: Bryan Ashby Date: Tue, 9 Apr 2019 20:24:52 -0600 Subject: [PATCH 1/7] Listen 'address' for Gopher --- core/servers/content/gopher.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/servers/content/gopher.js b/core/servers/content/gopher.js index ee889b8c..4e51c889 100644 --- a/core/servers/content/gopher.js +++ b/core/servers/content/gopher.js @@ -113,7 +113,7 @@ exports.getModule = class GopherModule extends ServerModule { return cb(Errors.Invalid(`Invalid port: ${config.contentServers.gopher.port}`)); } - return this.server.listen(port, cb); + return this.server.listen(port, config.contentServers.gopher.address, cb); } get enabled() { From 3460b98bf5bff2818d1a13fbef924eae1dc40599 Mon Sep 17 00:00:00 2001 From: Bryan Ashby Date: Tue, 9 Apr 2019 20:25:03 -0600 Subject: [PATCH 2/7] Listen 'address' for Web --- core/servers/content/web.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/servers/content/web.js b/core/servers/content/web.js index 1a09aace..04b9ccdd 100644 --- a/core/servers/content/web.js +++ b/core/servers/content/web.js @@ -138,7 +138,7 @@ exports.getModule = class WebServerModule extends ServerModule { return nextService(Errors.Invalid(`Invalid port: ${config.contentServers.web[service].port}`)); } - this[name].listen(port, err => { + this[name].listen(port, config.contentServers.web[service].address, err => { return nextService(err); }); } else { From 8114a1e3f21f6b8e721ec272d479d664a79ebff1 Mon Sep 17 00:00:00 2001 From: Bryan Ashby Date: Tue, 9 Apr 2019 20:25:14 -0600 Subject: [PATCH 3/7] Listen 'address' for Telnet --- core/servers/login/telnet.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/servers/login/telnet.js b/core/servers/login/telnet.js index fb6ca745..1b892e71 100644 --- a/core/servers/login/telnet.js +++ b/core/servers/login/telnet.js @@ -875,7 +875,7 @@ exports.getModule = class TelnetServerModule extends LoginServerModule { return cb(Errors.Invalid(`Invalid port: ${config.loginServers.telnet.port}`)); } - this.server.listen(port, err => { + this.server.listen(port, config.loginServers.telnet.address, err => { if(!err) { Log.info( { server : ModuleInfo.name, port : port }, 'Listening for connections' ); } From 37ea1e3a3032087cefdeffcad1068370326dd0d2 Mon Sep 17 00:00:00 2001 From: Bryan Ashby Date: Tue, 9 Apr 2019 20:25:27 -0600 Subject: [PATCH 4/7] Listen 'address' for SSH --- core/servers/login/ssh.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/servers/login/ssh.js b/core/servers/login/ssh.js index ee63ac78..acdabf26 100644 --- a/core/servers/login/ssh.js +++ b/core/servers/login/ssh.js @@ -353,7 +353,7 @@ exports.getModule = class SSHServerModule extends LoginServerModule { return cb(Errors.Invalid(`Invalid port: ${config.loginServers.ssh.port}`)); } - this.server.listen(port, err => { + this.server.listen(port, config.loginServers.ssh.address, err => { if(!err) { Log.info( { server : ModuleInfo.name, port : port }, 'Listening for connections' ); } From 50426d0e606c5bf455ecf456d2bb52bc864af876 Mon Sep 17 00:00:00 2001 From: Bryan Ashby Date: Tue, 9 Apr 2019 20:25:37 -0600 Subject: [PATCH 5/7] Listen 'address' for WebSockets --- core/servers/login/websocket.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/core/servers/login/websocket.js b/core/servers/login/websocket.js index 35bc0757..6a6b01dc 100644 --- a/core/servers/login/websocket.js +++ b/core/servers/login/websocket.js @@ -200,7 +200,8 @@ exports.getModule = class WebSocketLoginServer extends LoginServerModule { } const serverName = `${ModuleInfo.name} (${serverType})`; - const confPort = _.get(Config(), [ 'loginServers', 'webSocket', 'secure' === serverType ? 'wss' : 'ws', 'port' ] ); + const conf = _.get(Config(), [ 'loginServers', 'webSocket', 'secure' === serverType ? 'wss' : 'ws' ] ); + const confPort = conf.port; const port = parseInt(confPort); if(isNaN(port)) { @@ -208,7 +209,7 @@ exports.getModule = class WebSocketLoginServer extends LoginServerModule { return nextServerType(Errors.Invalid(`Invalid port: ${confPort}`)); } - server.httpServer.listen(port, err => { + server.httpServer.listen(port, conf.address, err => { if(err) { return nextServerType(err); } From 509831cc0c36d6836861ff890b65bfceef543c9b Mon Sep 17 00:00:00 2001 From: Bryan Ashby Date: Tue, 23 Apr 2019 18:16:55 -0600 Subject: [PATCH 6/7] Better handling of active door instances --- core/abracadabra.js | 31 ++++++++++++++++++++----------- 1 file changed, 20 insertions(+), 11 deletions(-) diff --git a/core/abracadabra.js b/core/abracadabra.js index 36a58544..9ac4dec7 100644 --- a/core/abracadabra.js +++ b/core/abracadabra.js @@ -84,6 +84,22 @@ exports.getModule = class AbracadabraModule extends MenuModule { * Font support ala all other menus... or does this just work? */ + incrementActiveDoorNodeInstances() { + if(activeDoorNodeInstances[this.config.name]) { + activeDoorNodeInstances[this.config.name] += 1; + } else { + activeDoorNodeInstances[this.config.name] = 1; + } + this.activeDoorInstancesIncremented = true; + } + + decrementActiveDoorNodeInstances() { + if(true === this.activeDoorInstancesIncremented) { + activeDoorNodeInstances[this.config.name] -= 1; + this.activeDoorInstancesIncremented = false; + } + } + initSequence() { const self = this; @@ -116,14 +132,8 @@ exports.getModule = class AbracadabraModule extends MenuModule { }); } } else { - // :TODO: JS elegant way to do this? - if(activeDoorNodeInstances[self.config.name]) { - activeDoorNodeInstances[self.config.name] += 1; - } else { - activeDoorNodeInstances[self.config.name] = 1; - } - - callback(null); + self.incrementActiveDoorNodeInstances(); + return callback(null); } }, function prepareDoor(callback) { @@ -169,6 +179,7 @@ exports.getModule = class AbracadabraModule extends MenuModule { this.doorInstance.run(exeInfo, () => { trackDoorRunEnd(doorTracking); + this.decrementActiveDoorNodeInstances(); // client may have disconnected while process was active - // we're done here if so. @@ -194,9 +205,7 @@ exports.getModule = class AbracadabraModule extends MenuModule { leave() { super.leave(); - if(!this.lastError) { - activeDoorNodeInstances[this.config.name] -= 1; - } + this.decrementActiveDoorNodeInstances(); } finishedLoading() { From 7a98198698dbe1882009f79c0c6f682b110b83d8 Mon Sep 17 00:00:00 2001 From: Bryan Ashby Date: Tue, 23 Apr 2019 18:17:40 -0600 Subject: [PATCH 7/7] Some doc updates --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 167f5288..b72d42cb 100644 --- a/README.md +++ b/README.md @@ -40,7 +40,7 @@ See [the issue tracker](https://github.com/NuSkooler/enigma-bbs/issues) for more * Use [the issue tracker](https://github.com/NuSkooler/enigma-bbs/issues) * **Discussion on a ENiGMA BBS!** (see Boards below) * IRC: **#enigma-bbs** on **chat.freenode.net** ([webchat](https://webchat.freenode.net/?channels=enigma-bbs)) -* Discussion on [fsxNet](http://bbs.geek.nz/#fsxNet) available on many boards +* FSX_ENG on [fsxNet](http://bbs.geek.nz/#fsxNet) available on many boards * Email: bryan -at- l33t.codes * [Facebook ENiGMA½ group](https://www.facebook.com/groups/enigmabbs/) @@ -76,7 +76,7 @@ Please see [Installation Methods](https://nuskooler.github.io/enigma-bbs/install * [Luciano Ayres](http://www.lucianoayres.com.br/) of [Blocktronics](http://blocktronics.org/), creator of the "Mystery Skulls" default ENiGMA½ theme! * Sudndeath for Xibalba ANSI work! * Jack Phlash for kick ass ENiGMA½ and Xibalba ASCII (Check out [IMPURE60](http://pc.textmod.es/pack/impure60/)!!) -* Avon of [Agency BBS](http://bbs.geek.nz/) and [fsxNet](http://bbs.geek.nz/#fsxNet) for putting up with my experiments to his system +* Avon of [Agency BBS](http://bbs.geek.nz/) and [fsxNet](http://bbs.geek.nz/#fsxNet) for putting up with my experiments to his system and for FSX_ENG! * Maskreet of [Throwback BBS](http://www.throwbackbbs.com/) hosting [DoorParty](http://forums.throwbackbbs.com/)! * [Apam](https://github.com/apamment) of [Magicka](https://magickabbs.com/) * [nail/blocktronics](http://blocktronics.org/tag/nail/) for the [sickmade Xibalba logo](http://pc.textmod.es/pack/blocktronics-420/n-xbalba.ans)!