move GeoIP functions into it's own class

extract the geoip database .gz in-game
This commit is contained in:
Matthias Mailänder
2015-05-23 15:37:33 +02:00
parent 78f1e9fb2f
commit 8e919d3215
6 changed files with 56 additions and 28 deletions

View File

@@ -252,7 +252,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic
var location = item.GetOrNull<LabelWidget>("LOCATION");
if (location != null)
{
var cachedServerLocation = LobbyUtils.LookupCountry(game.Address.Split(':')[0]);
var cachedServerLocation = GeoIP.LookupCountry(game.Address.Split(':')[0]);
location.GetText = () => cachedServerLocation;
location.GetColor = () => !compatible ? Color.DarkGray : !canJoin ? Color.LightGray : location.TextColor;
}