diff options
author | 0neGal <mail@0negal.com> | 2023-09-16 00:27:45 +0200 |
---|---|---|
committer | 0neGal <mail@0negal.com> | 2023-09-16 00:27:45 +0200 |
commit | ba64cef4fd5738e5744814bf67dddbd3865132f1 (patch) | |
tree | 830d6c98d5d6ceb4e14597e80247711d05b4f2f5 /src/modules | |
parent | 2fb192c4cb2d40652f642a54499d3b66d6af884d (diff) | |
download | Viper-ba64cef4fd5738e5744814bf67dddbd3865132f1.tar.gz Viper-ba64cef4fd5738e5744814bf67dddbd3865132f1.zip |
added button to force kill game
Diffstat (limited to 'src/modules')
-rw-r--r-- | src/modules/kill.js | 14 |
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; |