summaryrefslogtreecommitdiff
path: root/src/network/network_client.cpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2008-12-22 21:26:26 +0000
committerrubidium <rubidium@openttd.org>2008-12-22 21:26:26 +0000
commitdbb2950e831c1c2dca33eba1f600ef7c68a69fcd (patch)
treeb491caf9bf4a134ae72e13337a00c518804cd8b6 /src/network/network_client.cpp
parent8e8174987230eb298b1b86a225f3c6a175b86751 (diff)
downloadopenttd-dbb2950e831c1c2dca33eba1f600ef7c68a69fcd.tar.xz
(svn r14716) -Codechange: move more network core querying to the network files.
Diffstat (limited to 'src/network/network_client.cpp')
-rw-r--r--src/network/network_client.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/network/network_client.cpp b/src/network/network_client.cpp
index 1ef35508b..6f14efd80 100644
--- a/src/network/network_client.cpp
+++ b/src/network/network_client.cpp
@@ -974,4 +974,19 @@ bool NetworkClientPreferTeamChat(const NetworkClientInfo *cio)
return false;
}
+/**
+ * Print all the clients to the console
+ */
+void NetworkPrintClients()
+{
+ NetworkClientInfo *ci;
+ FOR_ALL_ACTIVE_CLIENT_INFOS(ci) {
+ IConsolePrintF(CC_INFO, "Client #%1d name: '%s' company: %1d IP: %s",
+ ci->client_id,
+ ci->client_name,
+ ci->client_playas + (IsValidCompanyID(ci->client_playas) ? 1 : 0),
+ GetClientIP(ci));
+ }
+}
+
#endif /* ENABLE_NETWORK */