31 lines
905 B
C#
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);
|
|
}
|
|
}
|