terminal parses boolean exactly.

This commit is contained in:
Olivier Gagnon
2021-12-03 14:44:32 -05:00
parent 99ed9b25a3
commit 13b08d7cc8
40 changed files with 67 additions and 55 deletions
+4 -1
View File
@@ -9,13 +9,16 @@ export function kill(
router: IRouter,
player: IPlayer,
server: BaseServer,
args: (string | number)[],
args: (string | number | boolean)[],
): void {
try {
if (args.length < 1) {
terminal.error("Incorrect usage of kill command. Usage: kill [scriptname] [arg1] [arg2]...");
return;
}
if (typeof args[0] === "boolean") {
return;
}
// Kill by PID
if (typeof args[0] === "number") {