Merge pull request #612 from Ylianst/revert-610-plugin
Revert "Expand PluginHandler to Support Periodic Updates"
This commit is contained in:
commit
011651b349
|
@ -2573,7 +2573,7 @@ function createMeshCore(agent) {
|
||||||
if ((meshCoreObj.av == null) || (JSON.stringify(meshCoreObj.av) != JSON.stringify(av))) { meshCoreObj.av = av; mesh.SendCommand(meshCoreObj); }
|
if ((meshCoreObj.av == null) || (JSON.stringify(meshCoreObj.av) != JSON.stringify(av))) { meshCoreObj.av = av; mesh.SendCommand(meshCoreObj); }
|
||||||
}
|
}
|
||||||
|
|
||||||
mesh.SendCommand({ action: "plugin", plugin: "__all", hook: "sendPeriodicServerUpdate"});
|
// TODO: add plugin hook here
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -2517,7 +2517,7 @@ function createMeshCore(agent) {
|
||||||
if ((meshCoreObj.av == null) || (JSON.stringify(meshCoreObj.av) != JSON.stringify(av))) { meshCoreObj.av = av; mesh.SendCommand(meshCoreObj); }
|
if ((meshCoreObj.av == null) || (JSON.stringify(meshCoreObj.av) != JSON.stringify(av))) { meshCoreObj.av = av; mesh.SendCommand(meshCoreObj); }
|
||||||
}
|
}
|
||||||
|
|
||||||
mesh.SendCommand({ action: "plugin", plugin: "__all", hook: "sendPeriodicServerUpdate"});
|
// TODO: add plugin hook here
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1278,11 +1278,7 @@ module.exports.CreateMeshAgent = function (parent, db, ws, req, args, domain) {
|
||||||
if (typeof command.plugin != 'string') break;
|
if (typeof command.plugin != 'string') break;
|
||||||
try {
|
try {
|
||||||
var pluginHandler = require('./pluginHandler.js').pluginHandler(parent.parent);
|
var pluginHandler = require('./pluginHandler.js').pluginHandler(parent.parent);
|
||||||
if (command.plugin == '__all') {
|
|
||||||
pluginHandler.callHook(command.hook, command, obj, parent);
|
|
||||||
} else {
|
|
||||||
pluginHandler.plugins[command.plugin].serveraction(command, obj, parent);
|
pluginHandler.plugins[command.plugin].serveraction(command, obj, parent);
|
||||||
}
|
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.log('Error loading plugin handler (' + e + ')');
|
console.log('Error loading plugin handler (' + e + ')');
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue