summaryrefslogtreecommitdiff
path: root/src/network
diff options
context:
space:
mode:
authorglx22 <glx22@users.noreply.github.com>2019-04-05 15:11:52 +0200
committerGitHub <noreply@github.com>2019-04-05 15:11:52 +0200
commita1e492d0d8970217800ebd78d328c9ddf0f13a31 (patch)
treec4135eccb649a412c2113f45b6306d95e9e08341 /src/network
parentfb6e31ca43b10b40fcaf1db0596dfaa48a1ecf20 (diff)
downloadopenttd-a1e492d0d8970217800ebd78d328c9ddf0f13a31.tar.xz
Fix #7439: don't overwrite CompanyRemoveReason with ClientID (#7465)
Diffstat (limited to 'src/network')
-rw-r--r--src/network/network_server.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/network/network_server.cpp b/src/network/network_server.cpp
index 36dde0f2c..1bcd7ca12 100644
--- a/src/network/network_server.cpp
+++ b/src/network/network_server.cpp
@@ -1673,7 +1673,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, CCA_DELETE | c->index << 16, CRR_AUTOCLEAN, CMD_COMPANY_CTRL);
+ DoCommandP(0, CCA_DELETE | c->index << 16 | CRR_AUTOCLEAN << 24, 0, 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? */
@@ -1687,7 +1687,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, CCA_DELETE | c->index << 16, CRR_AUTOCLEAN, CMD_COMPANY_CTRL);
+ DoCommandP(0, CCA_DELETE | c->index << 16 | CRR_AUTOCLEAN << 24, 0, CMD_COMPANY_CTRL);
IConsolePrintF(CC_DEFAULT, "Auto-cleaned company #%d with no vehicles", c->index + 1);
}
} else {