diff --git a/src/Constants.js b/src/Constants.js
index 8d713fbe4..b4bbc6f2d 100644
--- a/src/Constants.js
+++ b/src/Constants.js
@@ -162,6 +162,7 @@ CONSTANTS = {
"hostname Displays the hostname of the machine
" +
"ifconfig Displays the IP address of the machine
" +
"kill [script] Stops a script that is running on the current machine
" +
+ "killall Stops all running scripts on the current machine
" +
"ls Displays all programs and scripts on the machine
" +
"mem [script] Displays the amount of RAM the script requires to run
" +
"nano [script] Text editor - Open up and edit a script
" +
diff --git a/src/NetscriptEvaluator.js b/src/NetscriptEvaluator.js
index 2100db5cc..70085c306 100644
--- a/src/NetscriptEvaluator.js
+++ b/src/NetscriptEvaluator.js
@@ -256,6 +256,10 @@ function evaluate(exp, workerScript) {
}).catch(function(e) {
reject(e);
});
+ } else if (exp.func.value == "kill") {
+
+ } else if (exp.func.value == "killall") {
+
} else if (exp.func.value == "scp") {
if (exp.args.length != 2) {
return reject(makeRuntimeRejectMsg(workerScript, "scp() call has incorrect number of arguments. Takes 2 arguments"));
diff --git a/src/Terminal.js b/src/Terminal.js
index 5a35e0188..a13953b1b 100644
--- a/src/Terminal.js
+++ b/src/Terminal.js
@@ -236,7 +236,7 @@ function determineAllPossibilitiesForTabCompletion(input, index=0) {
//Autocomplete the command
if (index == -1) {
return ["alias", "analyze", "cat", "clear", "cls", "connect", "free",
- "hack", "help", "home", "hostname", "ifconfig", "kill",
+ "hack", "help", "home", "hostname", "ifconfig", "kill", "killall",
"ls", "mem", "nano", "ps", "rm", "run", "scan", "scan-analyze",
"scp", "sudov", "tail", "top"];
}
@@ -715,6 +715,13 @@ var Terminal = {
}
post("No such script is running. Nothing to kill");
break;
+ case "killall":
+ var s = Player.getCurrentServer();
+ for (var i = s.runningScripts.length; i >= 0; --i) {
+ killWorkerScript(s.runningScripts[i], s.ip);
+ }
+ post("Killing all running scripts. May take up to a few minutes for the scripts to die...");
+ break;
case "ls":
Terminal.executeListCommand(commandArray);
break;