Merge branch '0.0.10-alpha' of ssh://numinibsd/git/base/enigma-bbs into security-updates
This commit is contained in:
commit
e960e2800d
|
@ -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)
|
* Use [the issue tracker](https://github.com/NuSkooler/enigma-bbs/issues)
|
||||||
* **Discussion on a ENiGMA BBS!** (see Boards below)
|
* **Discussion on a ENiGMA BBS!** (see Boards below)
|
||||||
* IRC: **#enigma-bbs** on **chat.freenode.net** ([webchat](https://webchat.freenode.net/?channels=enigma-bbs))
|
* 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
|
* Email: bryan -at- l33t.codes
|
||||||
* [Facebook ENiGMA½ group](https://www.facebook.com/groups/enigmabbs/)
|
* [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!
|
* [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!
|
* Sudndeath for Xibalba ANSI work!
|
||||||
* Jack Phlash for kick ass ENiGMA½ and Xibalba ASCII (Check out [IMPURE60](http://pc.textmod.es/pack/impure60/)!!)
|
* 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/)!
|
* Maskreet of [Throwback BBS](http://www.throwbackbbs.com/) hosting [DoorParty](http://forums.throwbackbbs.com/)!
|
||||||
* [Apam](https://github.com/apamment) of [Magicka](https://magickabbs.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)!
|
* [nail/blocktronics](http://blocktronics.org/tag/nail/) for the [sickmade Xibalba logo](http://pc.textmod.es/pack/blocktronics-420/n-xbalba.ans)!
|
||||||
|
|
|
@ -84,6 +84,22 @@ exports.getModule = class AbracadabraModule extends MenuModule {
|
||||||
* Font support ala all other menus... or does this just work?
|
* 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() {
|
initSequence() {
|
||||||
const self = this;
|
const self = this;
|
||||||
|
|
||||||
|
@ -116,14 +132,8 @@ exports.getModule = class AbracadabraModule extends MenuModule {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// :TODO: JS elegant way to do this?
|
self.incrementActiveDoorNodeInstances();
|
||||||
if(activeDoorNodeInstances[self.config.name]) {
|
return callback(null);
|
||||||
activeDoorNodeInstances[self.config.name] += 1;
|
|
||||||
} else {
|
|
||||||
activeDoorNodeInstances[self.config.name] = 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
callback(null);
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
function prepareDoor(callback) {
|
function prepareDoor(callback) {
|
||||||
|
@ -169,6 +179,7 @@ exports.getModule = class AbracadabraModule extends MenuModule {
|
||||||
|
|
||||||
this.doorInstance.run(exeInfo, () => {
|
this.doorInstance.run(exeInfo, () => {
|
||||||
trackDoorRunEnd(doorTracking);
|
trackDoorRunEnd(doorTracking);
|
||||||
|
this.decrementActiveDoorNodeInstances();
|
||||||
|
|
||||||
// client may have disconnected while process was active -
|
// client may have disconnected while process was active -
|
||||||
// we're done here if so.
|
// we're done here if so.
|
||||||
|
@ -194,9 +205,7 @@ exports.getModule = class AbracadabraModule extends MenuModule {
|
||||||
|
|
||||||
leave() {
|
leave() {
|
||||||
super.leave();
|
super.leave();
|
||||||
if(!this.lastError) {
|
this.decrementActiveDoorNodeInstances();
|
||||||
activeDoorNodeInstances[this.config.name] -= 1;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
finishedLoading() {
|
finishedLoading() {
|
||||||
|
|
|
@ -113,7 +113,7 @@ exports.getModule = class GopherModule extends ServerModule {
|
||||||
return cb(Errors.Invalid(`Invalid port: ${config.contentServers.gopher.port}`));
|
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() {
|
get enabled() {
|
||||||
|
|
|
@ -138,7 +138,7 @@ exports.getModule = class WebServerModule extends ServerModule {
|
||||||
return nextService(Errors.Invalid(`Invalid port: ${config.contentServers.web[service].port}`));
|
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);
|
return nextService(err);
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -380,7 +380,7 @@ exports.getModule = class SSHServerModule extends LoginServerModule {
|
||||||
return cb(Errors.Invalid(`Invalid port: ${config.loginServers.ssh.port}`));
|
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) {
|
if(!err) {
|
||||||
Log.info( { server : ModuleInfo.name, port : port }, 'Listening for connections' );
|
Log.info( { server : ModuleInfo.name, port : port }, 'Listening for connections' );
|
||||||
}
|
}
|
||||||
|
|
|
@ -875,7 +875,7 @@ exports.getModule = class TelnetServerModule extends LoginServerModule {
|
||||||
return cb(Errors.Invalid(`Invalid port: ${config.loginServers.telnet.port}`));
|
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) {
|
if(!err) {
|
||||||
Log.info( { server : ModuleInfo.name, port : port }, 'Listening for connections' );
|
Log.info( { server : ModuleInfo.name, port : port }, 'Listening for connections' );
|
||||||
}
|
}
|
||||||
|
|
|
@ -200,7 +200,8 @@ exports.getModule = class WebSocketLoginServer extends LoginServerModule {
|
||||||
}
|
}
|
||||||
|
|
||||||
const serverName = `${ModuleInfo.name} (${serverType})`;
|
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);
|
const port = parseInt(confPort);
|
||||||
|
|
||||||
if(isNaN(port)) {
|
if(isNaN(port)) {
|
||||||
|
@ -208,7 +209,7 @@ exports.getModule = class WebSocketLoginServer extends LoginServerModule {
|
||||||
return nextServerType(Errors.Invalid(`Invalid port: ${confPort}`));
|
return nextServerType(Errors.Invalid(`Invalid port: ${confPort}`));
|
||||||
}
|
}
|
||||||
|
|
||||||
server.httpServer.listen(port, err => {
|
server.httpServer.listen(port, conf.address, err => {
|
||||||
if(err) {
|
if(err) {
|
||||||
return nextServerType(err);
|
return nextServerType(err);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue