From b11d3d20d93c1a14c6b6a3792c87568e33b39b64 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Schr=C3=B6dinger?= <132720404+Schrodinger71@users.noreply.github.com> Date: Sun, 30 Jun 2024 15:15:11 +0300 Subject: [PATCH 1/3] =?UTF-8?q?=D0=94=D0=BE=D0=B1=D0=B0=D0=B2=D0=BB=D0=B5?= =?UTF-8?q?=D0=BD=20=D0=BF=D1=80=D0=B5=D1=84=D0=B8=D0=BA=D1=81=20=D0=B0?= =?UTF-8?q?=D0=B4=D0=BC=D0=B8=D0=BD=D0=B0=20=D0=B2=20=D0=B0=D1=85=D0=B5?= =?UTF-8?q?=D0=BB=D0=BF=D0=B5=20(#31)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Описание PR ![image](https://github.com/AdventureTimeSS14/space_station_ADT/assets/132720404/e641c869-397a-4907-8d04-8846b820ed77) no cl --- Content.Server/Administration/Systems/BwoinkSystem.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Content.Server/Administration/Systems/BwoinkSystem.cs b/Content.Server/Administration/Systems/BwoinkSystem.cs index 0a797aa02a8..827a9944752 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 { From c93b0f03cff7a3c94bf5301b229ef3cd041b6048 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Schr=C3=B6dinger?= <132720404+Schrodinger71@users.noreply.github.com> Date: Sun, 30 Jun 2024 15:16:32 +0300 Subject: [PATCH 2/3] add prefix for achat (#32) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Описание PR add prefix for achat no cl --- Content.Server/Chat/Managers/ChatManager.cs | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/Content.Server/Chat/Managers/ChatManager.cs b/Content.Server/Chat/Managers/ChatManager.cs index 3c7bbfc4b96..70a0dec9034 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) { From b09b9648677c77a27bfd19cb3ff14a529227a032 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Schr=C3=B6dinger?= <132720404+Schrodinger71@users.noreply.github.com> Date: Sun, 30 Jun 2024 15:29:34 +0300 Subject: [PATCH 3/3] Use adminwho only admin (#34) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Описание PR Лишаем простых смертных "adminwho" --- Content.Server/Administration/Commands/AdminWhoCommand.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Content.Server/Administration/Commands/AdminWhoCommand.cs b/Content.Server/Administration/Commands/AdminWhoCommand.cs index b9df23e6215..cc2b86b7b2c 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";