Merge pull request #373 from Mughur/uptodate

BUGFIX: new servers check reserved names properly
This commit is contained in:
Mughur 2023-02-19 07:28:30 +02:00 committed by GitHub
commit 79eca93ade
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);
} }