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

@@ -85,7 +85,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic
address = UPnP.NatDevice.GetExternalIP().ToString();
var cachedDescriptiveIP = LobbyUtils.DescriptiveIpAddress(address);
ip.GetText = () => cachedDescriptiveIP;
var cachedCountryLookup = LobbyUtils.LookupCountry(address);
var cachedCountryLookup = GeoIP.LookupCountry(address);
location.GetText = () => cachedCountryLookup;
}
}