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

11 lines
344 B
TypeScript
Raw Normal View History

2022-09-06 15:07:12 +02:00
import { Terminal } from "../../Terminal";
2021-09-16 01:50:44 +02:00
import { BaseServer } from "../../Server/BaseServer";
2022-09-06 15:07:12 +02:00
export function hostname(args: (string | number | boolean)[], server: BaseServer): void {
2021-09-16 01:50:44 +02:00
if (args.length !== 0) {
2022-09-06 15:07:12 +02:00
Terminal.error("Incorrect usage of hostname command. Usage: hostname");
2021-09-16 01:50:44 +02:00
return;
}
2022-09-06 15:07:12 +02:00
Terminal.print(server.hostname);
2021-09-16 01:50:44 +02:00
}