Fix IDE0039
This commit is contained in:
@@ -37,24 +37,24 @@ namespace OpenRA.Server
|
||||
var status = cache[map];
|
||||
var failed = false;
|
||||
|
||||
Action<string> onLintFailure = message =>
|
||||
void OnLintFailure(string message)
|
||||
{
|
||||
Log.Write("server", "Map {0} failed lint with error: {1}", map.Title, message);
|
||||
failed = true;
|
||||
};
|
||||
}
|
||||
|
||||
Action<string> onLintWarning = _ => { };
|
||||
void OnLintWarning(string _) { }
|
||||
|
||||
foreach (var customMapPassType in modData.ObjectCreator.GetTypesImplementing<ILintServerMapPass>())
|
||||
{
|
||||
try
|
||||
{
|
||||
var customMapPass = (ILintServerMapPass)modData.ObjectCreator.CreateBasic(customMapPassType);
|
||||
customMapPass.Run(onLintFailure, onLintWarning, modData, map, rules);
|
||||
customMapPass.Run(OnLintFailure, OnLintWarning, modData, map, rules);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
onLintFailure(e.ToString());
|
||||
OnLintFailure(e.ToString());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -541,7 +541,7 @@ namespace OpenRA.Server
|
||||
return;
|
||||
}
|
||||
|
||||
Action completeConnection = () =>
|
||||
void CompleteConnection()
|
||||
{
|
||||
lock (LobbyInfo)
|
||||
{
|
||||
@@ -602,13 +602,13 @@ namespace OpenRA.Server
|
||||
else if (Map.Players.Players.Where(p => p.Value.Playable).All(p => !p.Value.AllowBots))
|
||||
SendLocalizedMessageTo(newConn, BotsDisabled);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
if (Type == ServerType.Local)
|
||||
{
|
||||
// Local servers can only be joined by the local client, so we can trust their identity without validation
|
||||
client.Fingerprint = handshake.Fingerprint;
|
||||
completeConnection();
|
||||
CompleteConnection();
|
||||
}
|
||||
else if (!string.IsNullOrEmpty(handshake.Fingerprint) && !string.IsNullOrEmpty(handshake.AuthSignature))
|
||||
{
|
||||
@@ -678,7 +678,7 @@ namespace OpenRA.Server
|
||||
DropClient(newConn);
|
||||
}
|
||||
else
|
||||
completeConnection();
|
||||
CompleteConnection();
|
||||
}));
|
||||
});
|
||||
}
|
||||
@@ -691,7 +691,7 @@ namespace OpenRA.Server
|
||||
DropClient(newConn);
|
||||
}
|
||||
else
|
||||
completeConnection();
|
||||
CompleteConnection();
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
|
||||
Reference in New Issue
Block a user