Remove remoteCommands plugin and interface

Remove the half baked remote rcon command interface in preparation for a
better version based on a new socket.io communication layer.
This commit is contained in:
Hornwitser committed 2019-11-20 22:37:25 +01:00
1 parent ca2967e255
commit 27fc68da0f
7 files changed
+2 -141

No files matched your search

-13
View File
@@ -1,13 +0,0 @@
/*
Config for clusterio remote command plugin.
Allows you to execute commands on slaves with a web API.
Careful, may allow for RCE vulnerabilities.
*/
module.exports = {
// Name of package. For display somewhere I guess.
name: "remoteCommands",
version: "1.0.0",
binary: "nodePackage",
description: "Config for clusterio remote command plugin. Allows you to execute commands on slaves with a web API.",
}
-25
View File
@@ -1,25 +0,0 @@
module.exports = class remoteCommands {
constructor(mergedConfig, messageInterface, extras){
this.messageInterface = messageInterface;
this.config = mergedConfig;
this.socket = extras.socket;
if(this.config.allowRemoteCommandExecution){
this.socket.on("runCommand", data => {
let {commandID} = data;
this.messageInterface(data.command);
if(commandID){
this.socket.emit("runCommandReturnValue", {
commandID,
body: {
info: "Command was sent to factorio",
},
});
}
});
}
}
scriptOutput(data){
// we don't return anything yet
}
}
@@ -1,4 +0,0 @@
// These are libraries that does not have any units test, they are
// required here in order to track coverage for them.
require('../index');