Remove secondary AllowPortForward setting.
The global setting is fine, and this simplifies both the code and the UI.
This commit is contained in:
@@ -134,8 +134,7 @@ namespace OpenRA.Server
|
||||
|
||||
randomSeed = (int)DateTime.Now.ToBinary();
|
||||
|
||||
// UPnP is only supported for servers created by the game client.
|
||||
if (!dedicated && Settings.AllowPortForward)
|
||||
if (UPnP.Status == UPnPStatus.Enabled)
|
||||
UPnP.ForwardPort(Settings.ListenPort, Settings.ExternalPort).Wait();
|
||||
|
||||
foreach (var trait in modData.Manifest.ServerTraits)
|
||||
@@ -206,7 +205,7 @@ namespace OpenRA.Server
|
||||
if (State == ServerState.ShuttingDown)
|
||||
{
|
||||
EndGame();
|
||||
if (!dedicated && Settings.AllowPortForward)
|
||||
if (UPnP.Status == UPnPStatus.Enabled)
|
||||
UPnP.RemovePortForward().Wait();
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user