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

Merge pull request #601 from ryanblenis/plugin

Expand pluginHandler support for plugins
This commit is contained in:
Ylian Saint-Hilaire 2019-10-25 01:10:52 -07:00 committed by GitHub
commit ad2542aa38
3 changed files with 7 additions and 19 deletions

View file

@ -819,15 +819,7 @@ function createMeshCore(agent) {
case 'ping': { mesh.SendCommand('{"action":"pong"}'); break; }
case 'pong': { break; }
case 'plugin': {
if (typeof data.pluginaction == 'string') {
try {
MeshServerLog('Plugin called', data);
// Not yet implemented
// require(data.plugin.name).serveraction(data);
} catch (e) {
MeshServerLog('Error calling plugin', data);
}
}
try { require(data.plugin).consoleaction(data, data.rights, data.sessionid, this); } catch (e) { throw e; }
break;
}
default:

View file

@ -819,15 +819,7 @@ function createMeshCore(agent) {
case 'ping': { mesh.SendCommand('{"action":"pong"}'); break; }
case 'pong': { break; }
case 'plugin': {
if (typeof data.pluginaction == 'string') {
try {
MeshServerLog('Plugin called', data);
// Not yet implemented
// require(data.plugin.name).serveraction(data);
} catch (e) {
MeshServerLog('Error calling plugin', data);
}
}
try { require(data.plugin).consoleaction(data, data.rights, data.sessionid, this); } catch (e) { throw e; }
break;
}
default: