* Print all the clients to the console */
| 2113 | * Print all the clients to the console |
| 2114 | */ |
| 2115 | void NetworkPrintClients() |
| 2116 | { |
| 2117 | for (NetworkClientInfo *ci : NetworkClientInfo::Iterate()) { |
| 2118 | if (_network_server) { |
| 2119 | IConsolePrint(CC_INFO, "Client #{} name: '{}' company: {} IP: {}", |
| 2120 | ci->client_id, |
| 2121 | ci->client_name, |
| 2122 | ci->client_playas + (Company::IsValidID(ci->client_playas) ? 1 : 0), |
| 2123 | ci->client_id == CLIENT_ID_SERVER ? "server" : NetworkClientSocket::GetByClientID(ci->client_id)->GetClientIP()); |
| 2124 | } else { |
| 2125 | IConsolePrint(CC_INFO, "Client #{} name: '{}' company: {}", |
| 2126 | ci->client_id, |
| 2127 | ci->client_name, |
| 2128 | ci->client_playas + (Company::IsValidID(ci->client_playas) ? 1 : 0)); |
| 2129 | } |
| 2130 | } |
| 2131 | } |
| 2132 | |
| 2133 | /** |
| 2134 | * Get the public key of the client with the given id. |
no test coverage detected