Skip to content

Commit

Permalink
tweak: An ordinary player can now use adminwho
Browse files Browse the repository at this point in the history
  • Loading branch information
Spatison committed Sep 3, 2024
1 parent 8068dda commit c1cdb88
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions Content.Server/Administration/Commands/AdminWhoCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

namespace Content.Server.Administration.Commands;

[AdminCommand(AdminFlags.Admin)]
[AnyCommand] // WD EDIT
public sealed class AdminWhoCommand : IConsoleCommand
{
public string Command => "adminwho";
Expand All @@ -33,15 +33,17 @@ public void Execute(IConsoleShell shell, string argStr, string[] args)
var first = true;
foreach (var admin in adminMgr.ActiveAdmins)
{
if (!first)
sb.Append('\n');
first = false;

// WD EDIT START
var adminData = adminMgr.GetAdminData(admin)!;
DebugTools.AssertNotNull(adminData);

if (adminData.Stealth && !seeStealth)
continue;
// WD EDIT END

if (!first)
sb.Append('\n');
first = false;

sb.Append(admin.Name);
if (adminData.Title is { } title)
Expand Down

0 comments on commit c1cdb88

Please sign in to comment.