From 7dbbb941b1f28849f070c0551d4a0e7609bf958a Mon Sep 17 00:00:00 2001 From: Schrodinger71 Date: Sun, 30 Jun 2024 12:58:50 +0300 Subject: [PATCH] add prefix for achat --- Content.Server/Chat/Managers/ChatManager.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Content.Server/Chat/Managers/ChatManager.cs b/Content.Server/Chat/Managers/ChatManager.cs index 3c7bbfc4b96..9af109f7422 100644 --- a/Content.Server/Chat/Managers/ChatManager.cs +++ b/Content.Server/Chat/Managers/ChatManager.cs @@ -280,9 +280,10 @@ private void SendAdminChat(ICommonSession player, string message) } var clients = _adminManager.ActiveAdmins.Select(p => p.Channel); + var senderName = player.Name + (string.IsNullOrEmpty(senderAdmin?.Title) ? "" : $" \\[{senderAdmin.Title}\\]"); // Добавил переменную senderName, в ней содержиться player.Name и условие на добавление префикса в админ чате. Tweak ADT Schrodinger 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) {