Feature: join servers based on their invite code

This removes the need to know a server IP to join it. Invite codes
are small (~7 characters) indentifiers for servers, which can be
exchanged with other players to join the servers.
This commit is contained in:
Patric Stout
2021-04-29 15:37:02 +02:00
committed by Patric Stout
parent 1baec41542
commit e4d216e44b
15 changed files with 422 additions and 29 deletions

View File

@@ -702,6 +702,7 @@ DEF_CONSOLE_CMD(ConServerInfo)
return true;
}
IConsolePrint(CC_DEFAULT, "Invite code: {}", _network_server_invite_code);
IConsolePrint(CC_DEFAULT, "Current/maximum clients: {:3d}/{:3d}", _network_game_info.clients_on, _settings_client.network.max_clients);
IConsolePrint(CC_DEFAULT, "Current/maximum companies: {:3d}/{:3d}", Company::GetNumItems(), _settings_client.network.max_companies);
IConsolePrint(CC_DEFAULT, "Current/maximum spectators: {:3d}/{:3d}", NetworkSpectatorCount(), _settings_client.network.max_spectators);