From: c4llv07e Date: Wed, 8 Jan 2025 15:23:33 +0000 (+0300) Subject: Fix empty lines in adminwho with stealthmins. (#34122) X-Git-Url: https://git.smokeofanarchy.ru/gitweb.cgi?a=commitdiff_plain;h=904d75c8a909e3f7806e662d404a89b880a4da88;p=space-station-14.git Fix empty lines in adminwho with stealthmins. (#34122) Don't print newline if admin is hidden. --- diff --git a/Content.Server/Administration/Commands/AdminWhoCommand.cs b/Content.Server/Administration/Commands/AdminWhoCommand.cs index feeec90e48..ee5c362a4d 100644 --- a/Content.Server/Administration/Commands/AdminWhoCommand.cs +++ b/Content.Server/Administration/Commands/AdminWhoCommand.cs @@ -33,16 +33,16 @@ public sealed class AdminWhoCommand : IConsoleCommand var first = true; foreach (var admin in adminMgr.ActiveAdmins) { - if (!first) - sb.Append('\n'); - first = false; - var adminData = adminMgr.GetAdminData(admin)!; DebugTools.AssertNotNull(adminData); if (adminData.Stealth && !seeStealth) continue; + if (!first) + sb.Append('\n'); + first = false; + sb.Append(admin.Name); if (adminData.Title is { } title) sb.Append($": [{title}]");