summaryrefslogtreecommitdiff
path: root/network.h
diff options
context:
space:
mode:
authortruelight <truelight@openttd.org>2004-12-16 13:59:23 +0000
committertruelight <truelight@openttd.org>2004-12-16 13:59:23 +0000
commit44f808132e7135ff78058f952ce0ccd0172e9c5a (patch)
tree4e45f952d8f16c9ddc3ac358df5ad8668d9a599a /network.h
parentb976a349c66a5855003ae966819aeb079d40f808 (diff)
downloadopenttd-44f808132e7135ff78058f952ce0ccd0172e9c5a.tar.xz
(svn r1131) -Add: [Network] Autoclean_companies (set it with 'set autoclean_companies on/off').
When enabled, empty companies (companies with no active clients) with no password are declared bankrupt after 1 year of emptyness. For empty companies with password, the password is removed after 3 years of emptyness. The delay of removing company/password can be configured via: - 'set autoclean_protected <months>' - 'set autoclean_unprotected <months>'
Diffstat (limited to 'network.h')
-rw-r--r--network.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/network.h b/network.h
index 086b42a8a..8439997d3 100644
--- a/network.h
+++ b/network.h
@@ -83,6 +83,7 @@ typedef struct NetworkPlayerInfo {
uint16 num_vehicle[NETWORK_VEHICLE_TYPES]; // How many vehicles are there of this type?
uint16 num_station[NETWORK_STATION_TYPES]; // How many stations are there of this type?
char players[NETWORK_PLAYERS_LENGTH]; // The players that control this company (Name1, name2, ..)
+ uint16 months_empty; // How many months the company is empty
} NetworkPlayerInfo;
typedef struct NetworkClientInfo {
@@ -175,6 +176,10 @@ VARDEF uint16 _network_udp_broadcast;
VARDEF bool _network_advertise;
VARDEF uint16 _network_last_advertise_date;
+VARDEF bool _network_autoclean_companies;
+VARDEF uint8 _network_autoclean_unprotected; // Remove a company after X months
+VARDEF uint8 _network_autoclean_protected; // Unprotect a company after X months
+
#endif /* ENABLE_NETWORK */
// Those variables must always be registered!