diff --git a/OpenRA.Game/Network/Session.cs b/OpenRA.Game/Network/Session.cs index f8d2eb70ae..0c52d0d61b 100644 --- a/OpenRA.Game/Network/Session.cs +++ b/OpenRA.Game/Network/Session.cs @@ -133,7 +133,7 @@ namespace OpenRA.Network // The full IP address is required for the IP banning moderation feature // but we must not share the un-anonymized address with other players. [FieldLoader.Ignore] - public string IpAddress; + public string IPAddress; public string AnonymizedIPAddress; public string Location; diff --git a/OpenRA.Game/Server/Server.cs b/OpenRA.Game/Server/Server.cs index a8d4dc97c7..dd334391d7 100644 --- a/OpenRA.Game/Server/Server.cs +++ b/OpenRA.Game/Server/Server.cs @@ -347,7 +347,7 @@ namespace OpenRA.Server var client = new Session.Client { Name = OpenRA.Settings.SanitizedPlayerName(handshake.Client.Name), - IpAddress = ipAddress.ToString(), + IPAddress = ipAddress.ToString(), AnonymizedIPAddress = Settings.ShareAnonymizedIPs ? Session.AnonymizeIP(ipAddress) : null, Location = GeoIP.LookupCountry(ipAddress), Index = newConn.PlayerIndex, @@ -391,10 +391,10 @@ namespace OpenRA.Server // Check if IP is banned var bans = Settings.Ban.Union(TempBans); - if (bans.Contains(client.IpAddress)) + if (bans.Contains(client.IPAddress)) { Log.Write("server", "Rejected connection from {0}; Banned.", newConn.Socket.RemoteEndPoint); - SendOrderTo(newConn, "ServerError", "You have been {0} from the server".F(Settings.Ban.Contains(client.IpAddress) ? "banned" : "temporarily banned")); + SendOrderTo(newConn, "ServerError", "You have been {0} from the server".F(Settings.Ban.Contains(client.IPAddress) ? "banned" : "temporarily banned")); DropClient(newConn); return; } diff --git a/OpenRA.Mods.Common/ServerTraits/LobbyCommands.cs b/OpenRA.Mods.Common/ServerTraits/LobbyCommands.cs index 466a83f7a0..e5b849d47c 100644 --- a/OpenRA.Mods.Common/ServerTraits/LobbyCommands.cs +++ b/OpenRA.Mods.Common/ServerTraits/LobbyCommands.cs @@ -595,9 +595,9 @@ namespace OpenRA.Mods.Common.Server if (tempBan) { - Log.Write("server", "Temporarily banning client {0} ({1}).", kickClientID, kickClient.IpAddress); + Log.Write("server", "Temporarily banning client {0} ({1}).", kickClientID, kickClient.IPAddress); server.SendMessage("{0} temporarily banned {1} from the server.".F(client.Name, kickClient.Name)); - server.TempBans.Add(kickClient.IpAddress); + server.TempBans.Add(kickClient.IPAddress); } server.SyncLobbyClients();