mirror of
https://github.com/space-syndicate/space-station-14.git
synced 2026-10-10 19:01:13 +03:00
* IoC source gen compatibility Can be merged before or after https://github.com/space-wizards/RobustToolbox/pull/6549 doesn't really matter. * Missed a spot
28 lines
805 B
C#
28 lines
805 B
C#
using Content.Server.Administration.Managers;
|
|
using Content.Shared.Administration;
|
|
using JetBrains.Annotations;
|
|
using Robust.Shared.Console;
|
|
|
|
namespace Content.Server.Administration.Commands
|
|
{
|
|
[UsedImplicitly]
|
|
[AdminCommand(AdminFlags.None)]
|
|
public sealed partial class DeAdminCommand : LocalizedCommands
|
|
{
|
|
[Dependency] private IAdminManager _admin = default!;
|
|
|
|
public override string Command => "deadmin";
|
|
|
|
public override void Execute(IConsoleShell shell, string argStr, string[] args)
|
|
{
|
|
var player = shell.Player;
|
|
if (player == null)
|
|
{
|
|
shell.WriteLine(Loc.GetString($"shell-cannot-run-command-from-server"));
|
|
return;
|
|
}
|
|
|
|
_admin.DeAdmin(player);
|
|
}
|
|
}
|
|
}
|