Command resolves and LEC conversions batch 4 (#38382)

* reeeecolllaaaaaaaa

* gonna convert these to public while I'm here for consistency sake

* requested changes.
This commit is contained in:
Kyle Tyo
2025-06-18 20:03:28 -04:00
committed by GitHub
parent d36a45a57f
commit ca72ca1464
18 changed files with 104 additions and 102 deletions

View File

@@ -6,19 +6,19 @@ using Robust.Shared.Console;
namespace Content.Server.Chat.Commands
{
[AdminCommand(AdminFlags.Adminchat)]
internal sealed class AdminChatCommand : IConsoleCommand
internal sealed class AdminChatCommand : LocalizedCommands
{
public string Command => "asay";
public string Description => "Send chat messages to the private admin chat channel.";
public string Help => "asay <text>";
[Dependency] private readonly IChatManager _chatManager = default!;
public void Execute(IConsoleShell shell, string argStr, string[] args)
public override string Command => "asay";
public override void Execute(IConsoleShell shell, string argStr, string[] args)
{
var player = shell.Player;
if (player == null)
{
shell.WriteError("You can't run this command locally.");
shell.WriteError(Loc.GetString($"shell-cannot-run-command-from-server"));
return;
}
@@ -29,7 +29,7 @@ namespace Content.Server.Chat.Commands
if (string.IsNullOrEmpty(message))
return;
IoCManager.Resolve<IChatManager>().TrySendOOCMessage(player, message, OOCChatType.Admin);
_chatManager.TrySendOOCMessage(player, message, OOCChatType.Admin);
}
}
}