mirror of
https://github.com/NuSkooler/enigma-bbs.git
synced 2025-06-08 05:34:41 +02:00
More Hot-Reload related changes
* Config.get(): Returns the latest config * Update code all over the place to use Config.get() vs Config.conf (which will be deprecated)
This commit is contained in:
parent
ca0149eaf0
commit
1fe46894d3
42 changed files with 320 additions and 273 deletions
|
@ -4,7 +4,7 @@
|
|||
// ENiGMA½
|
||||
var moduleUtil = require('./module_util.js');
|
||||
var Log = require('./logger.js').log;
|
||||
var Config = require('./config.js').config;
|
||||
var Config = require('./config.js').get;
|
||||
var asset = require('./asset.js');
|
||||
var MCIViewFactory = require('./mci_view_factory.js').MCIViewFactory;
|
||||
|
||||
|
@ -75,7 +75,7 @@ function loadMenu(options, cb) {
|
|||
|
||||
const modLoadOpts = {
|
||||
name : modSupplied ? modAsset.asset : 'standard_menu',
|
||||
path : (!modSupplied || 'systemModule' === modAsset.type) ? __dirname : Config.paths.mods,
|
||||
path : (!modSupplied || 'systemModule' === modAsset.type) ? __dirname : Config().paths.mods,
|
||||
category : (!modSupplied || 'systemModule' === modAsset.type) ? null : 'mods',
|
||||
};
|
||||
|
||||
|
@ -189,7 +189,7 @@ function handleAction(client, formData, conf, cb) {
|
|||
return callModuleMenuMethod(
|
||||
client,
|
||||
actionAsset,
|
||||
paths.join(Config.paths.mods, actionAsset.location),
|
||||
paths.join(Config().paths.mods, actionAsset.location),
|
||||
formData,
|
||||
conf.extraArgs,
|
||||
cb);
|
||||
|
@ -234,7 +234,7 @@ function handleNext(client, nextSpec, conf, cb) {
|
|||
case 'method' :
|
||||
case 'systemMethod' :
|
||||
if(_.isString(nextAsset.location)) {
|
||||
return callModuleMenuMethod(client, nextAsset, paths.join(Config.paths.mods, nextAsset.location), {}, extraArgs, cb);
|
||||
return callModuleMenuMethod(client, nextAsset, paths.join(Config().paths.mods, nextAsset.location), {}, extraArgs, cb);
|
||||
} else if('systemMethod' === nextAsset.type) {
|
||||
// :TODO: see other notes about system_menu_method.js here
|
||||
return callModuleMenuMethod(client, nextAsset, paths.join(__dirname, 'system_menu_method.js'), {}, extraArgs, cb);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue