diff options
author | rubidium <rubidium@openttd.org> | 2008-07-21 13:05:43 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2008-07-21 13:05:43 +0000 |
commit | aafd8393cc5161941ca28a5c6f6507335572794e (patch) | |
tree | 535b6d460d6bac2adcb2f25c076a891092c37c18 /src/network | |
parent | e6a1f1c0127e4a0b93935fa2fcb178eb88b2be7a (diff) | |
download | openttd-aafd8393cc5161941ca28a5c6f6507335572794e.tar.xz |
(svn r13773) -Codechange: disable autoclean for protected/unprotected companies when the timeout is set to 0. Based on an idea by Thomas.
Diffstat (limited to 'src/network')
-rw-r--r-- | src/network/network_server.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/network/network_server.cpp b/src/network/network_server.cpp index c3cf6ae3b..f85e15f29 100644 --- a/src/network/network_server.cpp +++ b/src/network/network_server.cpp @@ -1440,13 +1440,13 @@ static void NetworkAutoCleanCompanies() _network_player_info[p->index].months_empty++; /* Is the company empty for autoclean_unprotected-months, and is there no protection? */ - if (_network_player_info[p->index].months_empty > _settings_client.network.autoclean_unprotected && _network_player_info[p->index].password[0] == '\0') { + if (_settings_client.network.autoclean_unprotected != 0 && _network_player_info[p->index].months_empty > _settings_client.network.autoclean_unprotected && _network_player_info[p->index].password[0] == '\0') { /* Shut the company down */ DoCommandP(0, 2, p->index, NULL, CMD_PLAYER_CTRL); IConsolePrintF(CC_DEFAULT, "Auto-cleaned company #%d", p->index + 1); } /* Is the compnay empty for autoclean_protected-months, and there is a protection? */ - if (_network_player_info[p->index].months_empty > _settings_client.network.autoclean_protected && _network_player_info[p->index].password[0] != '\0') { + if (_settings_client.network.autoclean_protected != 0 && _network_player_info[p->index].months_empty > _settings_client.network.autoclean_protected && _network_player_info[p->index].password[0] != '\0') { /* Unprotect the company */ _network_player_info[p->index].password[0] = '\0'; IConsolePrintF(CC_DEFAULT, "Auto-removed protection from company #%d", p->index+1); |