# Conflicts: # Content.Client/Entry/EntryPoint.cs # Content.Client/IoC/ClientContentIoC.cs # Content.Server/Administration/Managers/BanManager.cs # Content.Server/Chat/Managers/ChatSanitizationManager.cs # Content.Server/Chat/Systems/ChatSystem.cs # Content.Server/Traitor/Uplink/UplinkSystem.cs # Content.Shared/Interaction/SharedInteractionSystem.cs # Content.Shared/Localizations/ContentLocalizationManager.cs # Content.Shared/Roles/JobRequirement/DepartmentTimeRequirement.cs # Content.Shared/Roles/JobRequirement/OverallPlaytimeRequirement.cs # Content.Shared/Roles/JobRequirement/RoleTimeRequirement.cs # Content.Shared/Weapons/Melee/SharedMeleeWeaponSystem.cs # Resources/Audio/Ambience/Antag/attributions.yml # Resources/Audio/Weapons/Guns/Gunshots/attributions.yml # Resources/Locale/en-US/_strings/advertisements/other/firebot.ftl # Resources/Locale/en-US/_strings/shuttles/commands.ftl # Resources/Prototypes/Datasets/Names/last.yml # Resources/Prototypes/Entities/Mobs/Player/silicon.yml # Resources/Prototypes/Entities/Objects/Specific/Robotics/borg_modules.yml # Resources/Prototypes/Entities/Structures/Machines/lathe.yml # Resources/Prototypes/Roles/Jobs/Science/borg.yml # Resources/Prototypes/Shuttles/shuttle_incoming_event.yml # Resources/ServerInfo/Guidebook/Antagonist/Traitors.xml # Resources/Textures/Clothing/Head/Hats/warden.rsi/equipped-HELMET.png # Resources/Textures/Clothing/Head/Hats/warden.rsi/meta.json # Resources/Textures/Clothing/Uniforms/Jumpskirt/ce.rsi/equipped-INNERCLOTHING.png # Resources/Textures/Clothing/Uniforms/Jumpskirt/ce.rsi/icon.png # Resources/Textures/Clothing/Uniforms/Jumpsuit/ce.rsi/equipped-INNERCLOTHING-monkey.png # Resources/Textures/Clothing/Uniforms/Jumpsuit/ce.rsi/equipped-INNERCLOTHING.png # Resources/Textures/Clothing/Uniforms/Jumpsuit/ce.rsi/icon.png # Resources/Textures/Clothing/Uniforms/Jumpsuit/ce.rsi/meta.json # Resources/Textures/Interface/Actions/actions_borg.rsi/meta.json # Resources/Textures/Structures/Wallmounts/posters.rsi/meta.json # RobustToolbox
57 lines
3 KiB
C#
57 lines
3 KiB
C#
using System.Collections.Immutable;
|
|
using System.Net;
|
|
using System.Threading.Tasks;
|
|
using Content.Shared.Database;
|
|
using Content.Shared.Roles;
|
|
using Robust.Shared.Network;
|
|
using Robust.Shared.Player;
|
|
using Robust.Shared.Prototypes;
|
|
|
|
namespace Content.Server.Administration.Managers;
|
|
|
|
public interface IBanManager
|
|
{
|
|
public void Initialize();
|
|
public void Restart();
|
|
|
|
/// <summary>
|
|
/// Bans the specified target, address range and / or HWID. One of them must be non-null
|
|
/// </summary>
|
|
/// <param name="target">Target user, username or GUID, null for none</param>
|
|
/// <param name="banningAdmin">The person who banned our target</param>
|
|
/// <param name="addressRange">Address range, null for none</param>
|
|
/// <param name="hwid">H</param>
|
|
/// <param name="minutes">Number of minutes to ban for. 0 and null mean permanent</param>
|
|
/// <param name="severity">Severity of the resulting ban note</param>
|
|
/// <param name="reason">Reason for the ban</param>
|
|
public void CreateServerBan(NetUserId? target, string? targetUsername, NetUserId? banningAdmin, (IPAddress, int)? addressRange, ImmutableArray<byte>? hwid, uint? minutes, NoteSeverity severity, string reason);
|
|
public HashSet<string>? GetRoleBans(NetUserId playerUserId);
|
|
public HashSet<ProtoId<JobPrototype>>? GetJobBans(NetUserId playerUserId);
|
|
|
|
/// <summary>
|
|
/// Creates a job ban for the specified target, username or GUID
|
|
/// </summary>
|
|
/// <param name="target">Target user, username or GUID, null for none</param>
|
|
/// <param name="role">Role to be banned from</param>
|
|
/// <param name="severity">Severity of the resulting ban note</param>
|
|
/// <param name="reason">Reason for the ban</param>
|
|
/// <param name="minutes">Number of minutes to ban for. 0 and null mean permanent</param>
|
|
/// <param name="timeOfBan">Time when the ban was applied, used for grouping role bans</param>
|
|
public void CreateRoleBan(NetUserId? target, string? targetUsername, NetUserId? banningAdmin, (IPAddress, int)? addressRange, ImmutableArray<byte>? hwid, string role, uint? minutes, NoteSeverity severity, string reason, DateTimeOffset timeOfBan);
|
|
|
|
public void WebhookUpdateRoleBans(NetUserId? target, string? targetUsername, NetUserId? banningAdmin, (IPAddress, int)? addressRange, ImmutableArray<byte>? hwid, IReadOnlyCollection<string> roles, uint? minutes, NoteSeverity severity, string reason, DateTimeOffset timeOfBan);
|
|
|
|
/// <summary>
|
|
/// Pardons a role ban for the specified target, username or GUID
|
|
/// </summary>
|
|
/// <param name="banId">The id of the role ban to pardon.</param>
|
|
/// <param name="unbanningAdmin">The admin, if any, that pardoned the role ban.</param>
|
|
/// <param name="unbanTime">The time at which this role ban was pardoned.</param>
|
|
public Task<string> PardonRoleBan(int banId, NetUserId? unbanningAdmin, DateTimeOffset unbanTime);
|
|
|
|
/// <summary>
|
|
/// Sends role bans to the target
|
|
/// </summary>
|
|
/// <param name="pSession">Player's session</param>
|
|
public void SendRoleBans(ICommonSession pSession);
|
|
}
|