diff options
author | rubidium42 <rubidium@openttd.org> | 2021-05-02 09:18:56 +0200 |
---|---|---|
committer | rubidium42 <rubidium42@users.noreply.github.com> | 2021-05-14 23:22:04 +0200 |
commit | 297d6e20bf0467d2a42e49bee291829ce3bb7c58 (patch) | |
tree | d428b9f170c31b1552b0365b21b916ff6ead6278 /src/network/network_func.h | |
parent | ebe32ad9129bb5846433366509728fb594f3be62 (diff) | |
download | openttd-297d6e20bf0467d2a42e49bee291829ce3bb7c58.tar.xz |
Codechange: [Network] Pass passwords as std::string to the network code
Diffstat (limited to 'src/network/network_func.h')
-rw-r--r-- | src/network/network_func.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/network/network_func.h b/src/network/network_func.h index bedc9bc54..82a5deb45 100644 --- a/src/network/network_func.h +++ b/src/network/network_func.h @@ -40,7 +40,7 @@ bool NetworkValidateClientName(); bool NetworkValidateClientName(std::string &client_name); void NetworkUpdateClientName(); bool NetworkCompanyHasClients(CompanyID company); -const char *NetworkChangeCompanyPassword(CompanyID company_id, const char *password); +std::string NetworkChangeCompanyPassword(CompanyID company_id, std::string password); void NetworkReboot(); void NetworkDisconnect(bool blocking = false, bool close_admins = true); void NetworkGameLoop(); @@ -51,10 +51,10 @@ void NetworkPopulateCompanyStats(NetworkCompanyStats *stats); void NetworkUpdateClientInfo(ClientID client_id); void NetworkClientsToSpectators(CompanyID cid); -bool NetworkClientConnectGame(const std::string &connection_string, CompanyID default_company, const char *join_server_password = nullptr, const char *join_company_password = nullptr); +bool NetworkClientConnectGame(const std::string &connection_string, CompanyID default_company, const std::string &join_server_password = "", const std::string &join_company_password = ""); void NetworkClientJoinGame(); void NetworkClientRequestMove(CompanyID company, const std::string &pass = ""); -void NetworkClientSendRcon(const char *password, const char *command); +void NetworkClientSendRcon(const std::string &password, const char *command); void NetworkClientSendChat(NetworkAction action, DestType type, int dest, const char *msg, int64 data = 0); bool NetworkClientPreferTeamChat(const NetworkClientInfo *cio); bool NetworkCompanyIsPassworded(CompanyID company_id); |