From 3e6514f5675545a56377c022eda68e7529212d23 Mon Sep 17 00:00:00 2001 From: Ylian Saint-Hilaire Date: Mon, 28 Oct 2019 09:20:10 -0700 Subject: [PATCH] Revert "Expand PluginHandler to Support Periodic Updates" --- agents/meshcore.js | 2 +- agents/meshcore.min.js | 2 +- meshagent.js | 6 +----- 3 files changed, 3 insertions(+), 7 deletions(-) diff --git a/agents/meshcore.js b/agents/meshcore.js index adee50d2..7800b72f 100644 --- a/agents/meshcore.js +++ b/agents/meshcore.js @@ -2573,7 +2573,7 @@ function createMeshCore(agent) { 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 } diff --git a/agents/meshcore.min.js b/agents/meshcore.min.js index e8788bd2..c64e8a59 100644 --- a/agents/meshcore.min.js +++ b/agents/meshcore.min.js @@ -2517,7 +2517,7 @@ function createMeshCore(agent) { 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 } diff --git a/meshagent.js b/meshagent.js index 50e75982..bf840f59 100644 --- a/meshagent.js +++ b/meshagent.js @@ -1278,11 +1278,7 @@ module.exports.CreateMeshAgent = function (parent, db, ws, req, args, domain) { if (typeof command.plugin != 'string') break; try { 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) { console.log('Error loading plugin handler (' + e + ')'); }