diff options
author | rubidium42 <rubidium42@users.noreply.github.com> | 2021-04-29 16:43:13 +0200 |
---|---|---|
committer | Patric Stout <github@truebrain.nl> | 2021-04-29 20:12:11 +0200 |
commit | a61696d6c565ff92c6604b12eefe36198d094056 (patch) | |
tree | 00b97ce4ada979ebf61e6c6c273a187bb0da67ee /src/network/network_func.h | |
parent | be37a2cab831cb645ef0f51dbcc944bd750f6926 (diff) | |
download | openttd-a61696d6c565ff92c6604b12eefe36198d094056.tar.xz |
Change: [Network] Encapsulate logic about the connection string to the network code (#23)
Diffstat (limited to 'src/network/network_func.h')
-rw-r--r-- | src/network/network_func.h | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/network/network_func.h b/src/network/network_func.h index 967bb6260..cd2b291bc 100644 --- a/src/network/network_func.h +++ b/src/network/network_func.h @@ -18,7 +18,6 @@ // #define DEBUG_FAILED_DUMP_COMMANDS #include "network_type.h" -#include "core/address.h" #include "../console_type.h" #include "../gfx_type.h" #include "../openttd.h" @@ -47,14 +46,12 @@ void NetworkDisconnect(bool blocking = false, bool close_admins = true); void NetworkGameLoop(); void NetworkBackgroundLoop(); void ParseFullConnectionString(const char **company, const char **port, char *connection_string); -NetworkAddress ParseConnectionString(const char *connection_string, int default_port); -NetworkAddress ParseGameConnectionString(CompanyID *company, const char *connection_string, int default_port); -void NetworkStartDebugLog(NetworkAddress &address); +void NetworkStartDebugLog(const std::string &connection_string); void NetworkPopulateCompanyStats(NetworkCompanyStats *stats); void NetworkUpdateClientInfo(ClientID client_id); void NetworkClientsToSpectators(CompanyID cid); -void NetworkClientConnectGame(NetworkAddress &address, CompanyID join_as, const char *join_server_password = nullptr, const char *join_company_password = nullptr); +void NetworkClientConnectGame(const std::string &connection_string, CompanyID default_company, const char *join_server_password = nullptr, const char *join_company_password = nullptr); void NetworkClientRequestMove(CompanyID company, const char *pass = ""); void NetworkClientSendRcon(const char *password, const char *command); void NetworkClientSendChat(NetworkAction action, DestType type, int dest, const char *msg, int64 data = 0); |