From fd4ca91d6f7c47c9ce97eed2c91b686cac391447 Mon Sep 17 00:00:00 2001 From: Duddino <47313600+Duddino@users.noreply.github.com> Date: Tue, 12 Jul 2022 04:14:24 +0200 Subject: [PATCH] Fix a bug where toggleready returns an exception when provided with the wrong number of arguments (#9631) --- Content.Server/GameTicking/Commands/ToggleReadyCommand.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Content.Server/GameTicking/Commands/ToggleReadyCommand.cs b/Content.Server/GameTicking/Commands/ToggleReadyCommand.cs index 024f9100ad..e68c4c5fa7 100644 --- a/Content.Server/GameTicking/Commands/ToggleReadyCommand.cs +++ b/Content.Server/GameTicking/Commands/ToggleReadyCommand.cs @@ -14,6 +14,11 @@ namespace Content.Server.GameTicking.Commands public void Execute(IConsoleShell shell, string argStr, string[] args) { var player = shell.Player as IPlayerSession; + if (args.Length != 1) + { + shell.WriteError(Loc.GetString("shell-wrong-arguments-number")); + return; + } if (player == null) { return;