1
0
Fork 0
mirror of https://github.com/Ylianst/MeshCentral.git synced 2025-03-09 15:40:18 +00:00

Improvements to plugin support.

This commit is contained in:
Ylian Saint-Hilaire 2019-10-10 11:13:25 -07:00
parent 5bc3da5bf6
commit ac5b6a9d73
11 changed files with 15748 additions and 561 deletions

View file

@ -1278,14 +1278,12 @@ module.exports.CreateMeshAgent = function (parent, db, ws, req, args, domain) {
break;
}
case 'plugin': {
if (typeof command.plugin == 'string') {
try {
if (typeof command.plugin != 'string') break;
try {
var pluginHandler = require('./pluginHandler.js').pluginHandler(parent.parent);
pluginHandler.plugins[command.plugin].serveraction(command, obj, parent);
} catch (e) {
console.log('Error loading plugin handler ('+ e + ')');
}
} catch (e) {
console.log('Error loading plugin handler (' + e + ')');
}
break;
}