diff --git a/Content.Server/Administration/Commands/AdminWhoCommand.cs b/Content.Server/Administration/Commands/AdminWhoCommand.cs index b9df23e621..cc2b86b7b2 100644 --- a/Content.Server/Administration/Commands/AdminWhoCommand.cs +++ b/Content.Server/Administration/Commands/AdminWhoCommand.cs @@ -7,7 +7,7 @@ namespace Content.Server.Administration.Commands; -[AnyCommand] // Corvax: Allow use to everyone +[AdminCommand(AdminFlags.Adminchat)] // Use only administration with flag AdminChat, eddit ADT public sealed class AdminWhoCommand : IConsoleCommand { public string Command => "adminwho"; diff --git a/Content.Server/Administration/Systems/BwoinkSystem.cs b/Content.Server/Administration/Systems/BwoinkSystem.cs index 0a797aa02a..827a994475 100644 --- a/Content.Server/Administration/Systems/BwoinkSystem.cs +++ b/Content.Server/Administration/Systems/BwoinkSystem.cs @@ -428,7 +428,7 @@ protected override void OnBwoinkTextMessage(BwoinkTextMessage message, EntitySes } else if (senderAdmin is not null && senderAdmin.HasFlag(AdminFlags.Adminhelp)) { - bwoinkText = $"[color=red]{senderSession.Name}[/color]"; + bwoinkText = $"\\[{senderAdmin.Title}\\][color=red]{senderSession.Name}[/color]"; //сообщение админа. тут подставляется префикс звания админа в сообщение. Tweak ADT } else { diff --git a/Content.Server/Chat/Managers/ChatManager.cs b/Content.Server/Chat/Managers/ChatManager.cs index 3c7bbfc4b9..70a0dec903 100644 --- a/Content.Server/Chat/Managers/ChatManager.cs +++ b/Content.Server/Chat/Managers/ChatManager.cs @@ -280,9 +280,19 @@ private void SendAdminChat(ICommonSession player, string message) } var clients = _adminManager.ActiveAdmins.Select(p => p.Channel); + var senderAdmin = _adminManager.GetAdminData(player); // Start-ADT Schrodinger Tweak: Отсюда сможем получить инфу о префиксе админа + if (senderAdmin == null) + { + return; + } + var senderName = player.Name; // Добавил переменную senderName, в ней содержиться player.Name и приставляем префикс к имени + if (!string.IsNullOrEmpty(senderAdmin.Title)) + { + senderName += $"\\[{senderAdmin.Title}\\]"; + } // End-ADT Tweak var wrappedMessage = Loc.GetString("chat-manager-send-admin-chat-wrap-message", ("adminChannelName", Loc.GetString("chat-manager-admin-channel-name")), - ("playerName", player.Name), ("message", FormattedMessage.EscapeText(message))); + ("playerName", senderName), ("message", FormattedMessage.EscapeText(message))); // ADT Tweak тут заменил player.Name на senderName foreach (var client in clients) {