Fix CA1310, CA1311

This commit is contained in:
RoosterDragon
2023-03-12 15:44:49 +00:00
committed by Matthias Mailänder
parent d83e579dfe
commit 285443f10f
43 changed files with 80 additions and 67 deletions

View File

@@ -207,7 +207,7 @@ namespace OpenRA.Mods.Common.Server
lock (server.LobbyInfo)
{
// Kick command is always valid for the host
if (command.StartsWith("kick "))
if (command.StartsWith("kick ", StringComparison.Ordinal))
return true;
if (server.State == ServerState.GameStarted)
@@ -215,7 +215,7 @@ namespace OpenRA.Mods.Common.Server
server.SendLocalizedMessageTo(conn, StateUnchangedGameStarted, Translation.Arguments("command", command));
return false;
}
else if (client.State == Session.ClientState.Ready && !(command.StartsWith("state") || command == "startgame"))
else if (client.State == Session.ClientState.Ready && !(command.StartsWith("state", StringComparison.Ordinal) || command == "startgame"))
{
server.SendLocalizedMessageTo(conn, StateUnchangedReady);
return false;