Perform the server code check inside of the server listings population. No code, no show.
This commit is contained in:
parent
407adcae14
commit
a7577f60d5
@ -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 += `<button class="serverListing" servid="${serv.getID()}" ${serv.getID() === giaSel ? 'selected' : ''}>
|
||||
<img class="serverListingImg" src="${serv.getIcon()}"/>
|
||||
<div class="serverListingDetails">
|
||||
|
Loading…
Reference in New Issue
Block a user