summaryrefslogtreecommitdiff
path: root/src/network/network_client.h
diff options
context:
space:
mode:
authorrubidium42 <rubidium@openttd.org>2021-05-02 09:07:09 +0200
committerrubidium42 <rubidium42@users.noreply.github.com>2021-05-14 23:22:04 +0200
commit1de5cdeab8387b23b566142f205ac9232a6f61a3 (patch)
treebb234a1704f3ec3449e0f0b7daf4a50929b09a42 /src/network/network_client.h
parent98283116fac58053ebd282772b0311a0b417cef7 (diff)
downloadopenttd-1de5cdeab8387b23b566142f205ac9232a6f61a3.tar.xz
Codechange: [Network] Use std::string for the internal handling of company passwords
Diffstat (limited to 'src/network/network_client.h')
-rw-r--r--src/network/network_client.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/network/network_client.h b/src/network/network_client.h
index ddc0e362c..c4dc4b1fd 100644
--- a/src/network/network_client.h
+++ b/src/network/network_client.h
@@ -91,13 +91,13 @@ public:
static NetworkRecvStatus SendAck();
static NetworkRecvStatus SendGamePassword(const char *password);
- static NetworkRecvStatus SendCompanyPassword(const char *password);
+ static NetworkRecvStatus SendCompanyPassword(const std::string &password);
static NetworkRecvStatus SendChat(NetworkAction action, DestType type, int dest, const char *msg, int64 data);
- static NetworkRecvStatus SendSetPassword(const char *password);
+ static NetworkRecvStatus SendSetPassword(const std::string &password);
static NetworkRecvStatus SendSetName(const char *name);
static NetworkRecvStatus SendRCon(const char *password, const char *command);
- static NetworkRecvStatus SendMove(CompanyID company, const char *password);
+ static NetworkRecvStatus SendMove(CompanyID company, const std::string &password);
static bool IsConnected();
@@ -110,15 +110,15 @@ public:
typedef ClientNetworkGameSocketHandler MyClient;
void NetworkClient_Connected();
-void NetworkClientSetCompanyPassword(const char *password);
+void NetworkClientSetCompanyPassword(const std::string &password);
/** Information required to join a server. */
struct NetworkJoinInfo {
- NetworkJoinInfo() : company(COMPANY_SPECTATOR), server_password(nullptr), company_password(nullptr) {}
+ NetworkJoinInfo() : company(COMPANY_SPECTATOR), server_password(nullptr) {}
std::string connection_string; ///< The address of the server to join.
CompanyID company; ///< The company to join.
const char *server_password; ///< The password of the server to join.
- const char *company_password; ///< The password of the company to join.
+ std::string company_password; ///< The password of the company to join.
};
extern NetworkJoinInfo _network_join;