2021-11-22 19:08:27 +01:00
|
|
|
|
using Content.Server.Administration.Logs;
|
|
|
|
|
|
using Content.Server.EUI;
|
|
|
|
|
|
using Content.Shared.Administration;
|
|
|
|
|
|
using Robust.Shared.Console;
|
|
|
|
|
|
|
|
|
|
|
|
namespace Content.Server.Administration.Commands;
|
|
|
|
|
|
|
|
|
|
|
|
[AdminCommand(AdminFlags.Logs)]
|
2025-06-17 13:22:03 -04:00
|
|
|
|
public sealed class OpenAdminLogsCommand : LocalizedEntityCommands
|
2021-11-22 19:08:27 +01:00
|
|
|
|
{
|
2025-06-17 13:22:03 -04:00
|
|
|
|
[Dependency] private readonly EuiManager _euiManager = default!;
|
2021-11-22 19:08:27 +01:00
|
|
|
|
|
2025-06-17 13:22:03 -04:00
|
|
|
|
public override string Command => "adminlogs";
|
|
|
|
|
|
|
|
|
|
|
|
public override void Execute(IConsoleShell shell, string argStr, string[] args)
|
2021-11-22 19:08:27 +01:00
|
|
|
|
{
|
2023-10-28 09:59:53 +11:00
|
|
|
|
if (shell.Player is not { } player)
|
2021-11-22 19:08:27 +01:00
|
|
|
|
{
|
2024-08-11 09:46:57 +00:00
|
|
|
|
shell.WriteError(Loc.GetString("shell-cannot-run-command-from-server"));
|
2021-11-22 19:08:27 +01:00
|
|
|
|
return;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
var ui = new AdminLogsEui();
|
2025-06-17 13:22:03 -04:00
|
|
|
|
_euiManager.OpenEui(ui, player);
|
2021-11-22 19:08:27 +01:00
|
|
|
|
}
|
|
|
|
|
|
}
|