* Get the name of the client, if the user did not send it yet, Client ID is used. * @param client_name The variable to write the name to. * @param last The pointer to the last element of the destination buffer */
| 2102 | * @param last The pointer to the last element of the destination buffer |
| 2103 | */ |
| 2104 | std::string ServerNetworkGameSocketHandler::GetClientName() const |
| 2105 | { |
| 2106 | const NetworkClientInfo *ci = this->GetInfo(); |
| 2107 | if (ci != nullptr && !ci->client_name.empty()) return ci->client_name; |
| 2108 | |
| 2109 | return fmt::format("Client #{}", this->client_id); |
| 2110 | } |
| 2111 | |
| 2112 | /** |
| 2113 | * Print all the clients to the console |
no test coverage detected