summaryrefslogtreecommitdiff
path: root/src/network/network_client.cpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2011-01-19 16:47:40 +0000
committerrubidium <rubidium@openttd.org>2011-01-19 16:47:40 +0000
commit795a5283289473185afdedb3133155101e84b0fe (patch)
tree00845d6c66a5a9289173acc4b7e1cb78eeb36c0d /src/network/network_client.cpp
parente54a1f67213218f52d8e27bce3aeda5d7dc16ad9 (diff)
downloadopenttd-795a5283289473185afdedb3133155101e84b0fe.tar.xz
(svn r21854) -Codechange: refactor the password setting methods to make it possible to change the password of other companies (on the server)
Diffstat (limited to 'src/network/network_client.cpp')
-rw-r--r--src/network/network_client.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/network/network_client.cpp b/src/network/network_client.cpp
index 0f6606352..15ad3c6d9 100644
--- a/src/network/network_client.cpp
+++ b/src/network/network_client.cpp
@@ -278,9 +278,9 @@ ClientNetworkGameSocketHandler * ClientNetworkGameSocketHandler::my_client = NUL
static uint32 last_ack_frame;
/** One bit of 'entropy' used to generate a salt for the company passwords. */
-uint32 _password_game_seed;
+static uint32 _password_game_seed;
/** The other bit of 'entropy' used to generate a salt for the company passwords. */
-char _password_server_id[NETWORK_SERVER_ID_LENGTH];
+static char _password_server_id[NETWORK_SERVER_ID_LENGTH];
/** Maximum number of companies of the currently joined server. */
static uint8 _network_server_max_companies;
@@ -1178,6 +1178,10 @@ void NetworkClientSendChat(NetworkAction action, DestType type, int dest, const
MyClient::SendChat(action, type, dest, msg, data);
}
+/**
+ * Set/Reset company password on the client side.
+ * @param password Password to be set.
+ */
void NetworkClientSetCompanyPassword(const char *password)
{
MyClient::SendSetPassword(password);