summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2011-08-13 08:32:55 +0000
committerfrosch <frosch@openttd.org>2011-08-13 08:32:55 +0000
commit6bb33acc0d86e1fdd6c30b1fa9b4308a908059ff (patch)
tree0efe9c0ad460bd43ec772c9f1da0b792257eab34 /src
parent81074e0ca2b8c7fa470db5b657998ac614a810de (diff)
downloadopenttd-6bb33acc0d86e1fdd6c30b1fa9b4308a908059ff.tar.xz
(svn r22738) -Fix [FS#4722] (r21854): Setting company passwords via the GUI on servers (including starting a company with the default password) failed, so no client could join.
Diffstat (limited to 'src')
-rw-r--r--src/console_cmds.cpp2
-rw-r--r--src/network/network.cpp4
-rw-r--r--src/network/network_func.h2
3 files changed, 4 insertions, 4 deletions
diff --git a/src/console_cmds.cpp b/src/console_cmds.cpp
index 98871010d..e5b8ad7e5 100644
--- a/src/console_cmds.cpp
+++ b/src/console_cmds.cpp
@@ -1640,7 +1640,7 @@ DEF_CONSOLE_CMD(ConCompanyPassword)
return false;
}
- password = NetworkChangeCompanyPassword(company_id, password, false);
+ password = NetworkChangeCompanyPassword(company_id, password);
if (StrEmpty(password)) {
IConsolePrintF(CC_WARNING, "Company password cleared");
diff --git a/src/network/network.cpp b/src/network/network.cpp
index f2f1486d5..b9125e12d 100644
--- a/src/network/network.cpp
+++ b/src/network/network.cpp
@@ -158,12 +158,12 @@ byte NetworkSpectatorCount()
* @param password The unhashed password we like to set ('*' or '' resets the password)
* @return The password.
*/
-const char *NetworkChangeCompanyPassword(CompanyID company_id, const char *password, bool already_hashed)
+const char *NetworkChangeCompanyPassword(CompanyID company_id, const char *password)
{
if (strcmp(password, "*") == 0) password = "";
if (_network_server) {
- NetworkServerSetCompanyPassword(company_id, password, already_hashed);
+ NetworkServerSetCompanyPassword(company_id, password, false);
} else {
NetworkClientSetCompanyPassword(password);
}
diff --git a/src/network/network_func.h b/src/network/network_func.h
index af530d068..015c7dba1 100644
--- a/src/network/network_func.h
+++ b/src/network/network_func.h
@@ -36,7 +36,7 @@ extern StringList _network_ban_list;
byte NetworkSpectatorCount();
void NetworkUpdateClientName();
bool NetworkCompanyHasClients(CompanyID company);
-const char *NetworkChangeCompanyPassword(CompanyID company_id, const char *password, bool already_hashed = true);
+const char *NetworkChangeCompanyPassword(CompanyID company_id, const char *password);
void NetworkReboot();
void NetworkDisconnect(bool blocking = false, bool close_admins = true);
void NetworkGameLoop();