aboutsummaryrefslogtreecommitdiff
path: root/src/modules/kill.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules/kill.js')
-rw-r--r--src/modules/kill.js10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/modules/kill.js b/src/modules/kill.js
index 5d03218..b0c4f97 100644
--- a/src/modules/kill.js
+++ b/src/modules/kill.js
@@ -1,12 +1,10 @@
const exec = require("child_process").exec;
const ipcMain = require("electron").ipcMain;
-ipcMain.on("kill-game", () => {
- kill.game();
-})
-
-ipcMain.on("kill-origin", () => {
- kill.origin();
+ipcMain.on("kill", (function_name) => {
+ if (typeof kill[function_name] == "function") {
+ kill[function_name]();
+ }
})
// a simple function to kill processes with a certain name