mirror of
https://github.com/NuSkooler/enigma-bbs.git
synced 2025-06-06 20:55:30 +02:00
ENiGMA 1/2 WILL USE SPACES FROM THIS POINT ON VS TABS
* Really just to make GitHub formatting happy. Arg.
This commit is contained in:
parent
5ddf04c882
commit
e9787cee3e
135 changed files with 27397 additions and 27397 deletions
|
@ -14,53 +14,53 @@ exports.recordMessage = recordMessage;
|
|||
let msgNetworkModules = [];
|
||||
|
||||
function startup(cb) {
|
||||
async.series(
|
||||
[
|
||||
function loadModules(callback) {
|
||||
loadModulesForCategory('scannerTossers', (err, module) => {
|
||||
if(!err) {
|
||||
const modInst = new module.getModule();
|
||||
async.series(
|
||||
[
|
||||
function loadModules(callback) {
|
||||
loadModulesForCategory('scannerTossers', (err, module) => {
|
||||
if(!err) {
|
||||
const modInst = new module.getModule();
|
||||
|
||||
modInst.startup(err => {
|
||||
if(!err) {
|
||||
msgNetworkModules.push(modInst);
|
||||
}
|
||||
});
|
||||
}
|
||||
}, err => {
|
||||
callback(err);
|
||||
});
|
||||
}
|
||||
],
|
||||
cb
|
||||
);
|
||||
modInst.startup(err => {
|
||||
if(!err) {
|
||||
msgNetworkModules.push(modInst);
|
||||
}
|
||||
});
|
||||
}
|
||||
}, err => {
|
||||
callback(err);
|
||||
});
|
||||
}
|
||||
],
|
||||
cb
|
||||
);
|
||||
}
|
||||
|
||||
function shutdown(cb) {
|
||||
async.each(
|
||||
msgNetworkModules,
|
||||
(msgNetModule, next) => {
|
||||
msgNetModule.shutdown( () => {
|
||||
return next();
|
||||
});
|
||||
},
|
||||
() => {
|
||||
msgNetworkModules = [];
|
||||
return cb(null);
|
||||
}
|
||||
);
|
||||
async.each(
|
||||
msgNetworkModules,
|
||||
(msgNetModule, next) => {
|
||||
msgNetModule.shutdown( () => {
|
||||
return next();
|
||||
});
|
||||
},
|
||||
() => {
|
||||
msgNetworkModules = [];
|
||||
return cb(null);
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
function recordMessage(message, cb) {
|
||||
//
|
||||
// Give all message network modules (scanner/tossers)
|
||||
// a chance to do something with |message|. Any or all can
|
||||
// choose to ignore it.
|
||||
//
|
||||
async.each(msgNetworkModules, (modInst, next) => {
|
||||
modInst.record(message);
|
||||
next();
|
||||
}, err => {
|
||||
cb(err);
|
||||
});
|
||||
//
|
||||
// Give all message network modules (scanner/tossers)
|
||||
// a chance to do something with |message|. Any or all can
|
||||
// choose to ignore it.
|
||||
//
|
||||
async.each(msgNetworkModules, (modInst, next) => {
|
||||
modInst.record(message);
|
||||
next();
|
||||
}, err => {
|
||||
cb(err);
|
||||
});
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue