summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatric Stout <truebrain@openttd.org>2021-09-19 22:52:46 +0200
committerGitHub <noreply@github.com>2021-09-19 21:52:46 +0100
commitd9f8ed7bdf5de55b339636f96d8958d04e6d6c6c (patch)
tree1ac04d7338172aa5f29fa21b3a4cfa8bfdd33d99
parent7e70ead39629c557c4580d1d66be0cdcc37480ec (diff)
downloadopenttd-d9f8ed7bdf5de55b339636f96d8958d04e6d6c6c.tar.xz
Add: [Network] On join, log the ClientID + IP + Name clearly (#9558)
Additionally, reword the disconnect to match connect / join messages. Co-authored-by: Berbe <4251220+Berbe@users.noreply.github.com>
-rw-r--r--src/network/network_server.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/network/network_server.cpp b/src/network/network_server.cpp
index 993053469..cc2d748d9 100644
--- a/src/network/network_server.cpp
+++ b/src/network/network_server.cpp
@@ -281,7 +281,7 @@ NetworkRecvStatus ServerNetworkGameSocketHandler::CloseConnection(NetworkRecvSta
}
NetworkAdminClientError(this->client_id, NETWORK_ERROR_CONNECTION_LOST);
- Debug(net, 3, "Closed client connection {}", this->client_id);
+ Debug(net, 3, "[{}] Client #{} closed connection", ServerNetworkGameSocketHandler::GetName(), this->client_id);
/* We just lost one client :( */
if (this->status >= STATUS_AUTHORIZED) _network_game_info.clients_on--;
@@ -948,6 +948,8 @@ NetworkRecvStatus ServerNetworkGameSocketHandler::Receive_CLIENT_MAP_OK(Packet *
NetworkTextMessage(NETWORK_ACTION_JOIN, CC_DEFAULT, false, client_name, "", this->client_id);
InvalidateWindowData(WC_CLIENT_LIST, 0);
+ Debug(net, 3, "[{}] Client #{} ({}) joined as {}", ServerNetworkGameSocketHandler::GetName(), this->client_id, this->GetClientIP(), client_name);
+
/* Mark the client as pre-active, and wait for an ACK
* so we know it is done loading and in sync with us */
this->status = STATUS_PRE_ACTIVE;