aboutsummaryrefslogtreecommitdiff
path: root/pkg
diff options
context:
space:
mode:
authorpg9182 <96569817+pg9182@users.noreply.github.com>2022-10-15 09:16:10 -0400
committerpg9182 <96569817+pg9182@users.noreply.github.com>2022-10-15 09:16:10 -0400
commit0ab45de6037f07fb439a7df3161c012342e64cd1 (patch)
treef65a81f410da196975fc16a9b2dfdfe1c898613f /pkg
parent3eb6f6383be0c467fa2c853c83ce8c19be4f6c4d (diff)
downloadAtlas-0ab45de6037f07fb439a7df3161c012342e64cd1.tar.gz
Atlas-0ab45de6037f07fb439a7df3161c012342e64cd1.zip
pkg/api/api0: Filter out mp_lobby && !private_match from /client/servers
This matches the behavior of the original master server.
Diffstat (limited to 'pkg')
-rw-r--r--pkg/api/api0/serverlist.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/pkg/api/api0/serverlist.go b/pkg/api/api0/serverlist.go
index c9a22b0..04ee79b 100644
--- a/pkg/api/api0/serverlist.go
+++ b/pkg/api/api0/serverlist.go
@@ -212,6 +212,9 @@ func (s *ServerList) csGetJSON() []byte {
if s.servers1 != nil {
for _, srv := range s.servers1 {
if s.serverState(srv, t) == serverListStateAlive {
+ if srv.Map == "mp_lobby" && srv.Playlist != "private_match" {
+ continue // don't include non-private_match servers on lobby
+ }
ss = append(ss, srv)
}
}