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:
hydroflame 2022-07-21 01:33:35 -04:00 committed by GitHub
commit 9946a2a667
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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 {