BUGFIX: new servers check reserved names properly

This commit is contained in:
Mughur 2023-02-18 03:34:09 +02:00 committed by GitHub
parent af0ed1dbb0
commit d55395491c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -59,7 +59,7 @@ export class Server extends BaseServer {
super(params); super(params);
// "hacknet-node-X" hostnames are reserved for Hacknet Servers // "hacknet-node-X" hostnames are reserved for Hacknet Servers
if (this.hostname.startsWith("hacknet-node-" || "hacknet-server-")) { if (this.hostname.startsWith("hacknet-node-") || this.hostname.startsWith("hacknet-server-")) {
this.hostname = createRandomString(10); this.hostname = createRandomString(10);
} }