Add "echo" command (#5331)

Co-authored-by: T <tomeno@lulzsec.co.uk>
This commit is contained in:
Tomeno
2021-11-14 17:29:07 +01:00
committed by GitHub
parent 4235f1cfd3
commit bdd2404fe0
2 changed files with 25 additions and 0 deletions

View File

@@ -0,0 +1,23 @@
using Content.Server.Administration;
using Robust.Shared.Console;
using Robust.Shared.Localization;
namespace Content.Server.Utility.Commands
{
[AnyCommand]
class EchoCommand : IConsoleCommand
{
public string Command => "echo";
public string Description => Loc.GetString("echo-command-description");
public string Help => Loc.GetString("echo-command-help-text", ("command", Command));
public void Execute(IConsoleShell shell, string argStr, string[] args)
{
if (argStr.Length > Command.Length)
shell.WriteLine(argStr.Substring(Command.Length+1));
return;
}
}
}