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
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: