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