allowUPnP is a bad name for automatic port forwards

also check it by default if all those checks went well
This commit is contained in:
Matthias Mailänder
2013-04-10 12:45:16 +02:00
parent 6fb6aba9fc
commit 23ca044515
4 changed files with 19 additions and 18 deletions

View File

@@ -99,7 +99,7 @@ namespace OpenRA.Server
randomSeed = (int)DateTime.Now.ToBinary();
if (Settings.AllowUPnP)
if (Settings.AllowPortForward)
ForwardPort();
foreach (var trait in modData.Manifest.ServerTraits)
@@ -157,7 +157,7 @@ namespace OpenRA.Server
if (State == ServerState.ShuttingDown)
{
EndGame();
if (Settings.AllowUPnP)
if (Settings.AllowPortForward)
RemovePortforward();
break;
}
@@ -185,7 +185,7 @@ namespace OpenRA.Server
catch (Exception e)
{
Log.Write("server", "Can not forward ports via UPnP: {0}", e);
Settings.AllowUPnP = false;
Settings.AllowPortForward = false;
}
}
@@ -200,7 +200,7 @@ namespace OpenRA.Server
catch (Exception e)
{
Log.Write("server", "Can not remove UPnP portforwarding rules: {0}", e);
Settings.AllowUPnP = false;
Settings.AllowPortForward = false;
}
}