From 99c9841274c7cd4faaf6f9569eb6683a92217adc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20Mail=C3=A4nder?= Date: Sat, 6 Jun 2015 14:39:24 +0200 Subject: [PATCH] don't log to which player the duplicate color belonged --- OpenRA.Mods.Common/ServerTraits/ColorValidator.cs | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/OpenRA.Mods.Common/ServerTraits/ColorValidator.cs b/OpenRA.Mods.Common/ServerTraits/ColorValidator.cs index 7535e2dec0..0b8c26f45d 100644 --- a/OpenRA.Mods.Common/ServerTraits/ColorValidator.cs +++ b/OpenRA.Mods.Common/ServerTraits/ColorValidator.cs @@ -160,17 +160,11 @@ namespace OpenRA.Mods.Common.Server } // Validate color against other clients - var playerColors = server.LobbyInfo.Clients - .Where(c => c.Index != playerIndex) - .ToDictionary(c => c.Color.RGB, c => c.Name); - - if (!ValidateColorAgainstForbidden(askedColor, playerColors.Keys, out forbiddenColor)) + var playerColors = server.LobbyInfo.Clients.Where(c => c.Index != playerIndex).Select(c => c.Color.RGB); + if (!ValidateColorAgainstForbidden(askedColor, playerColors, out forbiddenColor)) { if (connectionToEcho != null) - { - var client = playerColors[forbiddenColor]; - server.SendOrderTo(connectionToEcho, "Message", "Color was too similar to {0}, and has been adjusted.".F(client)); - } + server.SendOrderTo(connectionToEcho, "Message", "Color was too similar to another player's color, and has been adjusted."); return false; }