GetMOTDCommand.cs 596 B

1234567891011121314151617181920
  1. using Content.Shared.Administration;
  2. using Robust.Shared.Console;
  3. namespace Content.Server.Motd;
  4. /// <summary>
  5. /// A command that can be used by any player to print the Message of the Day.
  6. /// </summary>
  7. [AnyCommand]
  8. public sealed class GetMotdCommand : LocalizedCommands
  9. {
  10. [Dependency] private readonly IEntityManager _entityManager = default!;
  11. public override string Command => "get-motd";
  12. public override void Execute(IConsoleShell shell, string argStr, string[] args)
  13. {
  14. _entityManager.EntitySysManager.GetEntitySystem<MOTDSystem>().TrySendMOTD(shell);
  15. }
  16. }