2022-05-13 00:59:03 -07:00
|
|
|
|
using Content.Shared.Administration;
|
2023-10-28 09:59:53 +11:00
|
|
|
|
using Robust.Shared.Player;
|
2020-11-10 16:50:28 +01:00
|
|
|
|
|
|
|
|
|
|
namespace Content.Server.Administration
|
|
|
|
|
|
{
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Sealed when the permissions of an admin on the server change.
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
public sealed class AdminPermsChangedEventArgs : EventArgs
|
|
|
|
|
|
{
|
2023-10-28 09:59:53 +11:00
|
|
|
|
public AdminPermsChangedEventArgs(ICommonSession player, AdminFlags? flags)
|
2020-11-10 16:50:28 +01:00
|
|
|
|
{
|
|
|
|
|
|
Player = player;
|
|
|
|
|
|
Flags = flags;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// The player that had their admin permissions changed.
|
|
|
|
|
|
/// </summary>
|
2023-10-28 09:59:53 +11:00
|
|
|
|
public ICommonSession Player { get; }
|
2020-11-10 16:50:28 +01:00
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// The admin flags of the player. Null if the player is no longer an admin.
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
public AdminFlags? Flags { get; }
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Whether the player is now an admin.
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
public bool IsAdmin => Flags.HasValue;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|