Host bans, and a quieter direct-connection log

Host bans: the backend's new banned_hosts list (players the team has
stopped from hosting lobbies) is read with the other identity lists.
A listed player's own game refuses to host and stops a lobby already
running. Since that is theirs to change, everyone else's game does the
rest: the lobby browser leaves their lobbies out, and the game will not
join one by code or stay in one. They can still play on servers and in
other players' lobbies. The browser now also leaves out lobbies hosted
by globally banned players.

Server log: "Direct connection asked for by ..." is written once a
minute per player, with a count of the repeats. A player waiting for a
place on a full server asks again about every second, and each ask was
a line.
This commit is contained in:
AyeZeeBB committed 2026-10-09 20:31:05 -05:00
1 parent 20bd777b4c
commit e98169a2b6
10 files changed
+54 -7

No files matched your search

@@ -18,6 +18,7 @@ constexpr std::array<std::pair<std::string_view, IdentityList>, 5> categories{{
constexpr auto banned = static_cast<std::size_t>(IdentityList::banned);
constexpr auto servers = static_cast<std::size_t>(IdentityList::official_server);
constexpr auto blocked = static_cast<std::size_t>(IdentityList::blocked_server);
constexpr auto hosts = static_cast<std::size_t>(IdentityList::banned_host);
std::atomic<std::shared_ptr<const IdentityLists>> current;
@@ -65,6 +66,7 @@ IdentityLists parse_identity_lists(std::string_view json) {
if (answer.contains("banned")) read(answer.at("banned"), lists[banned]);
if (answer.contains("official_servers")) read(answer.at("official_servers"), lists[servers], server_id);
if (answer.contains("blocked_servers")) read(answer.at("blocked_servers"), lists[blocked], any_server_id);
if (answer.contains("banned_hosts")) read(answer.at("banned_hosts"), lists[hosts]);
return lists;
}
bool parse_server_tokens_required(std::string_view json) {