Skip to content

Commit dcd8a15

Browse files
authored
Change: prioritize servers without password over ones with in server listing (#39)
The in-game client already does this, and it makes a lot more sense to show servers you are free to join.
1 parent 8cc5e9f commit dcd8a15

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

webclient/pages/servers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ def _split_version(raw_version):
136136
def _sort_servers(servers):
137137
servers.sort(
138138
key=lambda x: _split_version(x["info"]["openttd_version"])
139-
+ [x["info"]["clients_on"], x["info"]["companies_on"]],
139+
+ ["0" if x["info"]["use_password"] else "1", x["info"]["clients_on"], x["info"]["companies_on"]],
140140
reverse=True,
141141
)
142142

0 commit comments

Comments
 (0)