mirror of
https://github.com/OpenTTD/OpenTTD
synced 2026-01-21 11:22:45 +01:00
Feature: console command to change authorized keys
This commit is contained in:
@@ -2243,6 +2243,18 @@ void NetworkPrintClients()
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the public key of the client with the given id.
|
||||
* @param client_id The id of the client.
|
||||
* @return View of the public key, which is empty when the client does not exist.
|
||||
*/
|
||||
std::string_view NetworkGetPublicKeyOfClient(ClientID client_id)
|
||||
{
|
||||
auto socket = NetworkClientSocket::GetByClientID(client_id);
|
||||
return socket == nullptr ? "" : socket->GetPeerPublicKey();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Perform all the server specific administration of a new company.
|
||||
* @param c The newly created company; can't be nullptr.
|
||||
|
||||
Reference in New Issue
Block a user