mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2024-12-25 06:35:54 -05:00
Debug code cleanup
This commit is contained in:
parent
e9d5982642
commit
f257c2b819
12
agents/meshcore.min.js
vendored
12
agents/meshcore.min.js
vendored
@ -1497,22 +1497,12 @@ function createMeshCore(agent)
|
||||
if (cmd == null) { return; }
|
||||
if ((cmd.ctrlChannel == '102938') || ((cmd.type == 'offer') && (cmd.sdp != null))) { onTunnelControlData(cmd, this); return; } // If this is control data, handle it now.
|
||||
if (cmd.action == undefined) { return; }
|
||||
//sendConsoleText('CMD: ' + JSON.stringify(cmd));
|
||||
|
||||
if ((cmd.path != null) && (process.platform != 'win32') && (cmd.path[0] != '/')) { cmd.path = '/' + cmd.path; } // Add '/' to paths on non-windows
|
||||
//console.log(objToString(cmd, 0, ' '));
|
||||
|
||||
switch (cmd.action) {
|
||||
case 'plugin': {
|
||||
try {
|
||||
require(cmd.plugin).consoleaction(cmd, null, null, this);
|
||||
} catch (e) {
|
||||
/*var fs = require('fs');
|
||||
var logStream = fs.createWriteStream('log.txt', {'flags': 'a'});
|
||||
logStream.write('\nCouldnt load plugin '+e+e.stack);
|
||||
logStream.end('\n')*/
|
||||
throw e;
|
||||
}
|
||||
} catch (e) { throw e; }
|
||||
|
||||
break;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user