mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2025-03-09 15:40:18 +00:00
More plugin hooks / development of base
This commit is contained in:
parent
36931698ad
commit
d143990f31
6 changed files with 200 additions and 17 deletions
12
meshagent.js
12
meshagent.js
|
@ -1345,6 +1345,18 @@ module.exports.CreateMeshAgent = function (parent, db, ws, req, args, domain) {
|
|||
});
|
||||
break;
|
||||
}
|
||||
case 'plugin': {
|
||||
if (typeof command.plugin == 'string') {
|
||||
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 + ')');
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
default: {
|
||||
parent.agentStats.unknownAgentActionCount++;
|
||||
console.log('Unknown agent action (' + obj.remoteaddrport + '): ' + command.action + '.');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue