aboutsummaryrefslogtreecommitdiff
path: root/src/modules
diff options
context:
space:
mode:
author0neGal <mail@0negal.com>2023-09-16 00:27:45 +0200
committer0neGal <mail@0negal.com>2023-09-16 00:27:45 +0200
commitba64cef4fd5738e5744814bf67dddbd3865132f1 (patch)
tree830d6c98d5d6ceb4e14597e80247711d05b4f2f5 /src/modules
parent2fb192c4cb2d40652f642a54499d3b66d6af884d (diff)
downloadViper-ba64cef4fd5738e5744814bf67dddbd3865132f1.tar.gz
Viper-ba64cef4fd5738e5744814bf67dddbd3865132f1.zip
added button to force kill game
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/kill.js14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/modules/kill.js b/src/modules/kill.js
index e0e93fc..3c93f7b 100644
--- a/src/modules/kill.js
+++ b/src/modules/kill.js
@@ -6,7 +6,7 @@ async function kill(process_name) {
let proc = process_name;
let cmd = (() => {
switch (process.platform) {
- case "linux": return "killall " + proc;
+ case "linux": return "killall -9 " + proc;
case "win32": return "taskkill /IM " + proc + " /F";
}
})();
@@ -31,4 +31,16 @@ kill.origin = async () => {
return false;
}
+kill.game = async () => {
+ let tf2 = await kill("Titanfall2.exe");
+ let northstar = await kill("NorthstarLauncher.exe");
+ let tf2_unpacked = await kill("Titanfall2-unpacked.exe");
+
+ if (tf2 || northstar || tf2_unpacked) {
+ return true;
+ }
+
+ return false;
+}
+
module.exports = kill;