Files
tbd-station-14/Content.Server/Administration/Commands/OpenAdminLogsCommand.cs
DrSmugleaf c3fe5909ad THE RETURN OF THE KING
This reverts commit c18d07538a.
2021-11-22 19:08:27 +01:00

31 lines
905 B
C#

using Content.Server.Administration.Logs;
using Content.Server.Administration.UI;
using Content.Server.EUI;
using Content.Shared.Administration;
using Robust.Server.Player;
using Robust.Shared.Console;
using Robust.Shared.IoC;
namespace Content.Server.Administration.Commands;
[AdminCommand(AdminFlags.Logs)]
public class OpenAdminLogsCommand : IConsoleCommand
{
public string Command => "adminlogs";
public string Description => "Opens the admin logs panel.";
public string Help => $"Usage: {Command}";
public void Execute(IConsoleShell shell, string argStr, string[] args)
{
if (shell.Player is not IPlayerSession player)
{
shell.WriteLine("This does not work from the server console.");
return;
}
var eui = IoCManager.Resolve<EuiManager>();
var ui = new AdminLogsEui();
eui.OpenEui(ui, player);
}
}