Mercurial > hg > openttd
changeset 17933:deb19d948306 draft
(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.
author | frosch <frosch@openttd.org> |
---|---|
date | Sat, 13 Aug 2011 08:32:55 +0000 |
parents | 62a4bcaf165b |
children | e3bb6dadeb12 |
files | src/console_cmds.cpp src/network/network.cpp src/network/network_func.h |
diffstat | 3 files changed, 4 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/src/console_cmds.cpp +++ b/src/console_cmds.cpp @@ -1640,7 +1640,7 @@ return false; } - password = NetworkChangeCompanyPassword(company_id, password, false); + password = NetworkChangeCompanyPassword(company_id, password); if (StrEmpty(password)) { IConsolePrintF(CC_WARNING, "Company password cleared");
--- a/src/network/network.cpp +++ b/src/network/network.cpp @@ -158,12 +158,12 @@ * @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); }
--- a/src/network/network_func.h +++ b/src/network/network_func.h @@ -36,7 +36,7 @@ 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();