diff options
author | Patric Stout <truebrain@openttd.org> | 2021-04-29 16:30:42 +0200 |
---|---|---|
committer | Patric Stout <github@truebrain.nl> | 2021-07-10 20:17:07 +0200 |
commit | e1e2212e0e09c7739f2eb8a4421a9ed7982801f5 (patch) | |
tree | c894ff3961367ef5c07e1ff3cfa482047ec83c4a /src/network/network_gamelist.h | |
parent | cbaac5609fb9017790c5cc747b2c60df1eb2b4a9 (diff) | |
download | openttd-e1e2212e0e09c7739f2eb8a4421a9ed7982801f5.tar.xz |
Codechange: track version of network servers to prune once out-of-date
Diffstat (limited to 'src/network/network_gamelist.h')
-rw-r--r-- | src/network/network_gamelist.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/network/network_gamelist.h b/src/network/network_gamelist.h index 6ef9d8e41..2bab7626e 100644 --- a/src/network/network_gamelist.h +++ b/src/network/network_gamelist.h @@ -26,15 +26,17 @@ struct NetworkGameList { bool online = false; ///< False if the server did not respond (default status) bool manually = false; ///< True if the server was added manually uint8 retries = 0; ///< Number of retries (to stop requerying) + int version = 0; ///< Used to see which servers are no longer available on the Game Coordinator and can be removed. NetworkGameList *next = nullptr; ///< Next pointer to make a linked game list }; -/** Game list of this client */ extern NetworkGameList *_network_game_list; +extern int _network_game_list_version; void NetworkGameListAddItemDelayed(NetworkGameList *item); NetworkGameList *NetworkGameListAddItem(const std::string &connection_string); void NetworkGameListRemoveItem(NetworkGameList *remove); +void NetworkGameListRemoveExpired(); void NetworkGameListRequery(); #endif /* NETWORK_GAMELIST_H */ |