Update to 1.10.0-beta2

This commit is contained in:
dP
2020-01-06 18:49:34 +03:00
parent 599ccf0c2b
commit c7c3966eec
1366 changed files with 2926 additions and 5639 deletions
+11 -23
View File
@@ -1,5 +1,3 @@
/* $Id$ */
/*
* This file is part of OpenTTD.
* OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
@@ -84,29 +82,19 @@ public:
{
return "admin";
}
/**
* Returns an iterable ensemble of all active admin sockets
* @param from index of the first socket to consider
* @return an iterable ensemble of all active admin sockets
*/
static Pool::IterateWrapper<ServerNetworkAdminSocketHandler> IterateActive(size_t from = 0)
{
return Pool::IterateWrapper<ServerNetworkAdminSocketHandler>(from,
[](size_t index) { return ServerNetworkAdminSocketHandler::Get(index)->GetAdminStatus() == ADMIN_STATUS_ACTIVE; });
}
};
/**
* Iterate over all the sockets from a given starting point.
* @param var The variable to iterate with.
* @param start The start of the iteration.
*/
#define FOR_ALL_ADMIN_SOCKETS_FROM(var, start) FOR_ALL_ITEMS_FROM(ServerNetworkAdminSocketHandler, adminsocket_index, var, start)
/**
* Iterate over all the sockets.
* @param var The variable to iterate with.
*/
#define FOR_ALL_ADMIN_SOCKETS(var) FOR_ALL_ADMIN_SOCKETS_FROM(var, 0)
/**
* Iterate over all the active sockets.
* @param var The variable to iterate with.
*/
#define FOR_ALL_ACTIVE_ADMIN_SOCKETS(var) \
FOR_ALL_ADMIN_SOCKETS(var) \
if (var->GetAdminStatus() == ADMIN_STATUS_ACTIVE)
void NetworkAdminClientInfo(const NetworkClientSocket *cs, bool new_client = false);
void NetworkAdminClientUpdate(const NetworkClientInfo *ci);
void NetworkAdminClientQuit(ClientID client_id);