diff --git a/Content.Server/Administration/BwoinkSystem.cs b/Content.Server/Administration/BwoinkSystem.cs index b2eac4020c..6fcfa80c57 100644 --- a/Content.Server/Administration/BwoinkSystem.cs +++ b/Content.Server/Administration/BwoinkSystem.cs @@ -1,15 +1,9 @@ #nullable enable using System.Linq; -using System.Collections.Generic; -using System.Diagnostics.CodeAnalysis; using Content.Server.Administration.Managers; using Content.Shared.Administration; using JetBrains.Annotations; using Robust.Shared.GameObjects; -using Robust.Shared.GameObjects.Components; -using Robust.Shared.Map; -using Robust.Shared.Players; -using Robust.Shared.Network; using Robust.Shared.Localization; using Robust.Server.Player; using Robust.Shared.IoC; @@ -32,8 +26,8 @@ namespace Content.Server.Administration // TODO: Sanitize text? // Confirm that this person is actually allowed to send a message here. var senderPersonalChannel = senderSession.UserId == message.ChannelId; - var senderAdmin = _adminManager.GetAdminData(senderSession) != null; - var authorized = senderPersonalChannel || senderAdmin; + var senderAdmin = _adminManager.GetAdminData(senderSession); + var authorized = senderPersonalChannel || senderAdmin != null; if (!authorized) { // Unauthorized bwoink (log?) @@ -42,9 +36,16 @@ namespace Content.Server.Administration var escapedText = Basic.EscapeText(message.Text); - var bwoinkText = senderAdmin - ? $"[color=red]{senderSession.Name}[/color]: {escapedText}" - : $"{senderSession.Name}: {escapedText}"; + + var bwoinkText = senderAdmin switch + { + var x when x is not null && x.Flags == AdminFlags.Adminhelp => + $"[color=purple]{senderSession.Name}[/color]: {escapedText}", + var x when x is not null && x.HasFlag(AdminFlags.Adminhelp) => + $"[color=red]{senderSession.Name}[/color]: {escapedText}", + _ => $"{senderSession.Name}: {escapedText}", + }; + var msg = new BwoinkTextMessage(message.ChannelId, senderSession.UserId, bwoinkText); LogBwoink(msg); diff --git a/Content.Shared/Administration/AdminFlags.cs b/Content.Shared/Administration/AdminFlags.cs index bd56aff3f5..537a412020 100644 --- a/Content.Shared/Administration/AdminFlags.cs +++ b/Content.Shared/Administration/AdminFlags.cs @@ -75,6 +75,11 @@ namespace Content.Shared.Administration /// Query = 1 << 11, + /// + /// Lets you use the admin help system. + /// + Adminhelp = 1 << 12, + /// /// Dangerous host permissions like scsi. ///