Files
tbd-station-14/Content.Server/Motd/GetMOTDCommand.cs
TemporalOroboros 93ec824d57 MotD (#13655)
* MOTD

* Message of the Day

* Pretty sure the tests aren't me. Let's check.

* Update Content.Shared/CCVar/CCVars.cs

Co-authored-by: AJCM-git <60196617+AJCM-git@users.noreply.github.com>

* command dependencies and moving MOTD to its own system

* Some doc comments

* Let's try those tests again

* More doc comments, most of the github reviews, and aliases for get-motd and set-motd

* Clear test MOTD

* Localized motd commands and completion hints

* Makes set-motd only show up in the alias command if the player has access to it.

---------

Co-authored-by: AJCM-git <60196617+AJCM-git@users.noreply.github.com>
2023-02-28 08:15:48 -08:00

21 lines
596 B
C#

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