Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Tweak] Adminwho #45

Merged
merged 1 commit into from
Sep 3, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading