* Antag Bans - traitors * Added Zombify conversion check for banned, fixed style on ban panel. * Fix All antag selection on grouprole * UI updates to show role and antag bans. * Fix All antag placement * Prevent Banned players from becoming revs. Added Random Death Smite. * part 1 PR changes. * Change appeal instructions to ccvar. * more readable expirationText logic * Remove duplicate service setups * Add helper methods for getting role/antag bans before checking. * Move Serverside antag Checks in to common methods on ban manager. * dont allow banned players to return to zombie body after being forced to ghost. * Move timer stuff in to existing gametick methods. * Cleaner UI ban check methods * Handle cases where a ban expires mid round and show new joining players their bans * Fix a bunch of mismatching time stamps, some were set in UTC, some in local ☠ * Keep the exisiting ban display ui overlay for latejoiners but use the new one in job selection. * Fix the rev conversion smite, use existing wait period for the end conditions to execute. * This was already happening. * Pretty sure the initial passes were false positives on this, no value keeping this on reflection. * Fix renaming messup from merge conflict. * Just mock the that the ban isnt real instead of going deeper with the DB stuff. * Remove double set on cache * Fix merge conflict * Adds a border to Oppenhopper poster (#34219) * border * Update meta.json * Update Resources/Textures/Structures/Wallmounts/posters.rsi/meta.json --------- Co-authored-by: slarticodefast <161409025+slarticodefast@users.noreply.github.com> * Trim trailing newlines from examine messages (#33381) * Trim trailing newlines from examine messages * TrimTrailingNewlines -> TrimEnd * фиксы * упс --------- Co-authored-by: Repo <47093363+Titian3@users.noreply.github.com> Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com> Co-authored-by: Spessmann <156740760+Spessmann@users.noreply.github.com> Co-authored-by: slarticodefast <161409025+slarticodefast@users.noreply.github.com> Co-authored-by: SpaceManiac <tad@platymuus.com>
42 lines
1.3 KiB
C#
42 lines
1.3 KiB
C#
using Content.Server.Administration.Managers;
|
|
using Content.Shared.Administration;
|
|
using Robust.Shared.Console;
|
|
|
|
namespace Content.Server.Administration.Commands;
|
|
|
|
[AdminCommand(AdminFlags.Ban)]
|
|
public sealed class RoleUnbanCommand : IConsoleCommand
|
|
{
|
|
public string Command => "roleunban";
|
|
public string Description => Loc.GetString("cmd-roleunban-desc");
|
|
public string Help => Loc.GetString("cmd-roleunban-help");
|
|
|
|
public async void Execute(IConsoleShell shell, string argStr, string[] args)
|
|
{
|
|
if (args.Length != 1)
|
|
{
|
|
shell.WriteLine(Help);
|
|
return;
|
|
}
|
|
|
|
if (!int.TryParse(args[0], out var banId))
|
|
{
|
|
shell.WriteLine($"Unable to parse {args[0]} as a ban id integer.\n{Help}");
|
|
return;
|
|
}
|
|
|
|
var banManager = IoCManager.Resolve<IBanManager>();
|
|
var response = await banManager.PardonRoleBan(banId, shell.Player?.UserId, DateTimeOffset.UtcNow);
|
|
shell.WriteLine(response);
|
|
}
|
|
|
|
public CompletionResult GetCompletion(IConsoleShell shell, string[] args)
|
|
{
|
|
// Can't think of good way to do hint options for this
|
|
return args.Length switch
|
|
{
|
|
1 => CompletionResult.FromHint(Loc.GetString("cmd-roleunban-hint-1")),
|
|
_ => CompletionResult.Empty
|
|
};
|
|
}
|
|
}
|