From a7577f60d5e4693d5ff2a026503ee61bc324e561 Mon Sep 17 00:00:00 2001 From: TheFlash787 Date: Thu, 13 Aug 2020 00:20:05 +0100 Subject: [PATCH] Perform the server code check inside of the server listings population. No code, no show. --- app/assets/js/scripts/overlay.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/app/assets/js/scripts/overlay.js b/app/assets/js/scripts/overlay.js index ed70404..dd314d0 100644 --- a/app/assets/js/scripts/overlay.js +++ b/app/assets/js/scripts/overlay.js @@ -267,6 +267,12 @@ function populateServerListings(){ const servers = distro.getServers() let htmlString = '' for(const serv of servers){ + if(serv.getServerCode() != null && serv.getServerCode() === ''){ + if(ConfigManager.getServerCode() !== serv.getServerCode()){ + // skips any servers which the player hasn't got the code to access + continue + } + } htmlString += `