mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-24 02:03:01 +02:00
BUGFIX: Prevent renaming servers to hacknet. (#1112)
* Add hacknet check to renaming * Handle manual server purchases * Handle automated server purchases * Remove unnecessary parenthesis fixes #1111
This commit is contained in:
@@ -1167,6 +1167,10 @@ export const ns: InternalAPI<NSFull> = {
|
||||
helpers.log(ctx, () => `Invalid argument: hostname='${hostnameStr}'`);
|
||||
return "";
|
||||
}
|
||||
if (hostnameStr.startsWith("hacknet-node-") || hostnameStr.startsWith("hacknet-server-")) {
|
||||
helpers.log(ctx, () => `Invalid argument: hostname='${hostnameStr}' is a reserved hostname.`);
|
||||
return "";
|
||||
}
|
||||
|
||||
if (Player.purchasedServers.length >= getPurchaseServerLimit()) {
|
||||
helpers.log(
|
||||
|
||||
Reference in New Issue
Block a user