mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-11-26 09:33:49 +01:00
Merge pull request #3841 from crimsonhawk47/fix-ip-exists-function
BUGFIX: Fix #3803 Servers can no longer have duplicate IPs
This commit is contained in:
commit
9946a2a667
@ -77,7 +77,12 @@ export function DeleteServer(serverkey: string): void {
|
||||
}
|
||||
|
||||
export function ipExists(ip: string): boolean {
|
||||
return AllServers[ip] != null;
|
||||
for (const hostName in AllServers) {
|
||||
if (AllServers[hostName].ip === ip) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
export function createUniqueRandomIp(): string {
|
||||
|
Loading…
Reference in New Issue
Block a user