diff options
author | rubidium <rubidium@openttd.org> | 2011-10-15 20:42:32 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2011-10-15 20:42:32 +0000 |
commit | de27205e6c8aec594f7ae3b8205e8a1d60c24751 (patch) | |
tree | 84a180f9001812109677d95c57ee446178dada0d /src/network/network_server.cpp | |
parent | 16e1314f58fa96915d79ca8419465ab2e5e8639e (diff) | |
download | openttd-de27205e6c8aec594f7ae3b8205e8a1d60c24751.tar.xz |
(svn r23031) -Fix [FS#4804]: for the admin "bots" there was no distinction between bankruptcy and manual removal of companies even though the API suggested that
Diffstat (limited to 'src/network/network_server.cpp')
-rw-r--r-- | src/network/network_server.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/network/network_server.cpp b/src/network/network_server.cpp index 507c9232e..ebf78a320 100644 --- a/src/network/network_server.cpp +++ b/src/network/network_server.cpp @@ -1643,8 +1643,7 @@ static void NetworkAutoCleanCompanies() /* Is the company empty for autoclean_unprotected-months, and is there no protection? */ if (_settings_client.network.autoclean_unprotected != 0 && _network_company_states[c->index].months_empty > _settings_client.network.autoclean_unprotected && StrEmpty(_network_company_states[c->index].password)) { /* Shut the company down */ - DoCommandP(0, 2 | c->index << 16, 0, CMD_COMPANY_CTRL); - NetworkAdminCompanyRemove(c->index, ADMIN_CRR_AUTOCLEAN); + DoCommandP(0, 2 | c->index << 16, CRR_AUTOCLEAN, CMD_COMPANY_CTRL); IConsolePrintF(CC_DEFAULT, "Auto-cleaned company #%d with no password", c->index + 1); } /* Is the company empty for autoclean_protected-months, and there is a protection? */ @@ -1658,8 +1657,7 @@ static void NetworkAutoCleanCompanies() /* Is the company empty for autoclean_novehicles-months, and has no vehicles? */ if (_settings_client.network.autoclean_novehicles != 0 && _network_company_states[c->index].months_empty > _settings_client.network.autoclean_novehicles && vehicles_in_company[c->index] == 0) { /* Shut the company down */ - DoCommandP(0, 2 | c->index << 16, 0, CMD_COMPANY_CTRL); - NetworkAdminCompanyRemove(c->index, ADMIN_CRR_AUTOCLEAN); + DoCommandP(0, 2 | c->index << 16, CRR_AUTOCLEAN, CMD_COMPANY_CTRL); IConsolePrintF(CC_DEFAULT, "Auto-cleaned company #%d with no vehicles", c->index + 1); } } else { |