bitburner-src/src/Terminal/commands/sudov.ts

24 lines
636 B
TypeScript
Raw Normal View History

2021-09-16 01:50:44 +02:00
import { ITerminal } from "../ITerminal";
2021-09-17 08:58:02 +02:00
import { IRouter } from "../../ui/Router";
2021-09-16 01:50:44 +02:00
import { IPlayer } from "../../PersonObjects/IPlayer";
import { BaseServer } from "../../Server/BaseServer";
export function sudov(
terminal: ITerminal,
2021-09-17 08:58:02 +02:00
router: IRouter,
2021-09-16 01:50:44 +02:00
player: IPlayer,
server: BaseServer,
2021-12-03 20:44:32 +01:00
args: (string | number | boolean)[],
2021-09-16 01:50:44 +02:00
): void {
if (args.length !== 0) {
terminal.error("Incorrect number of arguments. Usage: sudov");
return;
}
if (server.hasAdminRights) {
terminal.print("You have ROOT access to this machine");
} else {
terminal.print("You do NOT have root access to this machine");
}
}