Revert "Expand PluginHandler to Support Periodic Updates"

Ylian Saint-Hilaire committed Oct 28, 2019 at 09:20 UTC 95dc3e5360cc9b54534f8fe420160ba843084cb7
3 files changed +3 -7
agents/meshcore.js
+1 -1
@@ -2573,7 +2573,7 @@ function createMeshCore(agent) {
2573 if ((meshCoreObj.av == null) || (JSON.stringify(meshCoreObj.av) != JSON.stringify(av))) { meshCoreObj.av = av; mesh.SendCommand(meshCoreObj); }
2574 }
2575
2576 - mesh.SendCommand({ action: "plugin", plugin: "__all", hook: "sendPeriodicServerUpdate"});
2576 + // TODO: add plugin hook here
2577 }
2578
2579
agents/meshcore.min.js
+1 -1
@@ -2517,7 +2517,7 @@ function createMeshCore(agent) {
2517 if ((meshCoreObj.av == null) || (JSON.stringify(meshCoreObj.av) != JSON.stringify(av))) { meshCoreObj.av = av; mesh.SendCommand(meshCoreObj); }
2518 }
2519
2520 - mesh.SendCommand({ action: "plugin", plugin: "__all", hook: "sendPeriodicServerUpdate"});
2520 + // TODO: add plugin hook here
2521 }
2522
2523
meshagent.js
+1 -5
@@ -1278,11 +1278,7 @@ module.exports.CreateMeshAgent = function (parent, db, ws, req, args, domain) {
1278 if (typeof command.plugin != 'string') break;
1279 try {
1280 var pluginHandler = require('./pluginHandler.js').pluginHandler(parent.parent);
1281 - if (command.plugin == '__all') {
1282 - pluginHandler.callHook(command.hook, command, obj, parent);
1283 - } else {
1284 - pluginHandler.plugins[command.plugin].serveraction(command, obj, parent);
1285 - }
1281 + pluginHandler.plugins[command.plugin].serveraction(command, obj, parent);
1282 } catch (e) {
1283 console.log('Error loading plugin handler (' + e + ')');
1284 }