mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-12-20 05:05:47 +01:00
ipExists acceses server list correctly
This commit is contained in:
parent
6f017bf4f6
commit
1e2e42af75
@ -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