From 226753086562ac9d2b33aff1ee87ff86c06df440 Mon Sep 17 00:00:00 2001 From: Oliver Brakmann Date: Fri, 16 Jan 2015 20:15:43 +0100 Subject: [PATCH] Fix showing wrong IP for server admins in the lobby client tooltips The external IP will now only be resolved for the local client. --- OpenRA.Mods.RA/Widgets/Logic/ClientTooltipLogic.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/OpenRA.Mods.RA/Widgets/Logic/ClientTooltipLogic.cs b/OpenRA.Mods.RA/Widgets/Logic/ClientTooltipLogic.cs index cd47257bf0..6ead10eb7d 100644 --- a/OpenRA.Mods.RA/Widgets/Logic/ClientTooltipLogic.cs +++ b/OpenRA.Mods.RA/Widgets/Logic/ClientTooltipLogic.cs @@ -76,7 +76,8 @@ namespace OpenRA.Mods.RA.Widgets.Logic latency.GetText = () => LobbyUtils.LatencyDescription(ping); latency.GetColor = () => LobbyUtils.LatencyColor(ping); var address = orderManager.LobbyInfo.ClientWithIndex(clientIndex).IpAddress; - if (address == IPAddress.Loopback.ToString() && UPnP.NatDevice != null) + if (clientIndex == orderManager.LocalClient.Index && UPnP.NatDevice != null + && address == IPAddress.Loopback.ToString()) address = UPnP.NatDevice.GetExternalIP().ToString(); var cachedDescriptiveIP = LobbyUtils.DescriptiveIpAddress(address); ip.GetText = () => cachedDescriptiveIP;