summaryrefslogtreecommitdiff
path: root/src/network
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2011-04-22 15:57:05 +0000
committerrubidium <rubidium@openttd.org>2011-04-22 15:57:05 +0000
commit1c419d99bcb72eb198796f1695c003b3736abe8f (patch)
tree7fdd0f0cd0e195c7ef9fd0cd1d304650a74d8b6f /src/network
parentf1d0c1a74698ad3fc42ed93ba1587160f8a6941a (diff)
downloadopenttd-1c419d99bcb72eb198796f1695c003b3736abe8f.tar.xz
(svn r22364) -Codechange: don't show the (unknown) client address in the client list at clients
Diffstat (limited to 'src/network')
-rw-r--r--src/network/network_client.cpp15
-rw-r--r--src/network/network_server.cpp15
2 files changed, 15 insertions, 15 deletions
diff --git a/src/network/network_client.cpp b/src/network/network_client.cpp
index d86857a63..3cdf5c5c3 100644
--- a/src/network/network_client.cpp
+++ b/src/network/network_client.cpp
@@ -1237,19 +1237,4 @@ bool NetworkMaxSpectatorsReached()
return NetworkSpectatorCount() >= (_network_server ? _settings_client.network.max_spectators : _network_server_max_spectators);
}
-/**
- * Print all the clients to the console
- */
-void NetworkPrintClients()
-{
- NetworkClientInfo *ci;
- FOR_ALL_CLIENT_INFOS(ci) {
- IConsolePrintF(CC_INFO, "Client #%1d name: '%s' company: %1d IP: %s",
- ci->client_id,
- ci->client_name,
- ci->client_playas + (Company::IsValidID(ci->client_playas) ? 1 : 0),
- GetClientIP(ci));
- }
-}
-
#endif /* ENABLE_NETWORK */
diff --git a/src/network/network_server.cpp b/src/network/network_server.cpp
index 6f3255ce9..8851d1810 100644
--- a/src/network/network_server.cpp
+++ b/src/network/network_server.cpp
@@ -1965,4 +1965,19 @@ void ServerNetworkGameSocketHandler::GetClientName(char *client_name, size_t siz
}
}
+/**
+ * Print all the clients to the console
+ */
+void NetworkPrintClients()
+{
+ NetworkClientInfo *ci;
+ FOR_ALL_CLIENT_INFOS(ci) {
+ IConsolePrintF(CC_INFO, _network_server ? "Client #%1d name: '%s' company: %1d IP: %s" : "Client #%1d name: '%s' company: %1d",
+ ci->client_id,
+ ci->client_name,
+ ci->client_playas + (Company::IsValidID(ci->client_playas) ? 1 : 0),
+ _network_server ? GetClientIP(NetworkClientInfo::GetByClientID(ci->client_id)) : "");
+ }
+}
+
#endif /* ENABLE_NETWORK */