Require GeoLite2 database path to be specified by the server operator.

This commit is contained in:
Paul Chote
2020-01-11 12:22:17 +00:00
committed by abcdefg30
parent 6b2c019caa
commit d74a5065b9
5 changed files with 35 additions and 23 deletions

View File

@@ -149,7 +149,7 @@ namespace OpenRA.Server
randomSeed = (int)DateTime.Now.ToBinary();
GeoIP.Initialize();
GeoIP.Initialize(settings.GeoIPDatabase);
if (UPnP.Status == UPnPStatus.Enabled)
UPnP.ForwardPort(Settings.ListenPort, Settings.ListenPort).Wait();
@@ -348,7 +348,7 @@ namespace OpenRA.Server
{
Name = OpenRA.Settings.SanitizedPlayerName(handshake.Client.Name),
IpAddress = ipAddress.ToString(),
Location = GeoIP.LookupCountry(ipAddress.ToString()),
Location = GeoIP.LookupCountry(ipAddress),
Index = newConn.PlayerIndex,
PreferredColor = handshake.Client.PreferredColor,
Color = handshake.Client.Color,