Add: allow setting your server visibility to "invite-only" (#9434)

In this mode you do register to the Game Coordinator, but your
server will not show up in the public server listing. You can give
your friends the invite code of the server with which they can
join.
This commit is contained in:
Patric Stout
2021-07-11 21:57:05 +02:00
committed by GitHub
parent 8bb9c3f646
commit b6a116a247
10 changed files with 86 additions and 31 deletions

View File

@@ -15,6 +15,7 @@
#include "town_type.h"
#include "transport_type.h"
#include "network/core/config.h"
#include "network/network_type.h"
#include "company_type.h"
#include "cargotype.h"
#include "linkgraph/linkgraph_type.h"
@@ -266,6 +267,7 @@ struct NetworkSettings {
uint16 server_port; ///< port the server listens on
uint16 server_admin_port; ///< port the server listens on for the admin network
bool server_admin_chat; ///< allow private chat for the server to be distributed to the admin network
ServerGameType server_game_type; ///< Server type: local / public / invite-only.
std::string server_invite_code; ///< Invite code to use when registering as server.
std::string server_invite_code_secret; ///< Secret to proof we got this invite code from the Game Coordinator.
std::string server_name; ///< name of the server