includes deadmined admins in adminsystem playerlist updates
This commit is contained in:
@@ -76,12 +76,12 @@ namespace Content.Server.Administration
|
||||
|
||||
if(args == null) return;
|
||||
|
||||
foreach (var admin in _adminManager.ActiveAdmins)
|
||||
foreach (var admin in _adminManager.AllAdmins)
|
||||
{
|
||||
RaiseNetworkEvent(args, admin.ConnectedClient);
|
||||
}
|
||||
|
||||
if (e.NewStatus != SessionStatus.Disconnected && _adminManager.IsAdmin(e.Session))
|
||||
if (e.NewStatus != SessionStatus.Disconnected && _adminManager.IsAdmin(e.Session, true))
|
||||
{
|
||||
SendFullPlayerList(e.Session);
|
||||
}
|
||||
|
||||
@@ -44,6 +44,8 @@ namespace Content.Server.Administration.Managers
|
||||
.Where(p => p.Value.Data.Active)
|
||||
.Select(p => p.Key);
|
||||
|
||||
public IEnumerable<IPlayerSession> AllAdmins => _admins.Select(p => p.Key);
|
||||
|
||||
// If a command isn't in this list it's server-console only.
|
||||
// if a command is in but the flags value is null it's available to everybody.
|
||||
private readonly HashSet<string> _anyCommands = new();
|
||||
|
||||
@@ -24,6 +24,11 @@ namespace Content.Server.Administration.Managers
|
||||
/// </remarks>
|
||||
IEnumerable<IPlayerSession> ActiveAdmins { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets all admins currently on the server, even de-adminned ones.
|
||||
/// </summary>
|
||||
IEnumerable<IPlayerSession> AllAdmins { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Checks if a player is an admin.
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user