]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Fix empty lines in adminwho with stealthmins. (#34122)
authorc4llv07e <igor@c4llv07e.xyz>
Wed, 8 Jan 2025 15:23:33 +0000 (18:23 +0300)
committerGitHub <noreply@github.com>
Wed, 8 Jan 2025 15:23:33 +0000 (10:23 -0500)
Don't print newline if admin is hidden.

Content.Server/Administration/Commands/AdminWhoCommand.cs

index feeec90e483b4122a69491ae99895904fa77df7b..ee5c362a4d5b4428bc97c32783d14dd3962fe5bd 100644 (file)
@@ -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}]");