From 44c7d28e6498de4f0c672a6bacb62b3fdd7b9f64 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Schr=C3=B6dinger?= <132720404+Schrodinger71@users.noreply.github.com> Date: Sat, 4 Jan 2025 21:27:05 +0300 Subject: [PATCH] =?UTF-8?q?=D0=9F=D1=80=D0=B0=D0=B2=D0=BA=D0=B0=20=D0=92?= =?UTF-8?q?=D0=B5=D0=B1=D1=85=D1=83=D0=BA=D0=B0=20=D0=B0-=D1=87=D0=B0?= =?UTF-8?q?=D1=82=D0=B0=20(#942)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Небольшие правки форма текста no cl, no fun --- .../Administration/Managers/AdminManager.cs | 11 ++++------- Content.Server/Chat/Managers/ChatManager.cs | 2 +- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/Content.Server/Administration/Managers/AdminManager.cs b/Content.Server/Administration/Managers/AdminManager.cs index c0cb1ca83ac..a57237eb20c 100644 --- a/Content.Server/Administration/Managers/AdminManager.cs +++ b/Content.Server/Administration/Managers/AdminManager.cs @@ -111,7 +111,7 @@ public async void DeAdmin(ICommonSession session) // ADT-tweak: add "async" return; var payload = new WebhookPayload { - Content = $"**Снял права**: **{session.Name}**" + Content = $"**Снял права**: `{session.Name}`" }; var identifier = webhookData.ToIdentifier(); await _discord.CreateMessage(identifier, payload); @@ -198,7 +198,7 @@ public async void ReAdmin(ICommonSession session) // ADT-tweak: add "async" return; var payload = new WebhookPayload { - Content = $"**Вернул права**: **{session.Name}**" + Content = $"**Вернул права**: `{session.Name}`" }; var identifier = webhookData.ToIdentifier(); await _discord.CreateMessage(identifier, payload); @@ -407,7 +407,7 @@ private async void DisconnectedAdminMaybe(ICommonSession session) return; var payload = new WebhookPayload { - Content = $"**Оповещение: Админ ВЫШЕЛ {senderName}**" + Content = $"**Оповещение: Админ ВЫШЕЛ** `{senderName}`" }; var identifier = webhookData.ToIdentifier(); await _discord.CreateMessage(identifier, payload); @@ -459,14 +459,11 @@ private async void LoginAdminMaybe(ICommonSession session) var senderAdmin = GetAdminData(session); if (senderAdmin == null) return; - var senderName = session.Name; - if (!string.IsNullOrEmpty(senderAdmin.Title)) - senderName += $"\\[{senderAdmin.Title}\\]"; if (await _discord.GetWebhook(webhookUrl) is not { } webhookData) return; var payload = new WebhookPayload { - Content = $"**Оповещение: Админ зашёл {senderName}**" + Content = $"**Оповещение: Админ ЗАШЁЛ** `{session.Name}`[{senderAdmin.Title}]" }; var identifier = webhookData.ToIdentifier(); await _discord.CreateMessage(identifier, payload); diff --git a/Content.Server/Chat/Managers/ChatManager.cs b/Content.Server/Chat/Managers/ChatManager.cs index e21ff29c9db..ddb9738d54b 100644 --- a/Content.Server/Chat/Managers/ChatManager.cs +++ b/Content.Server/Chat/Managers/ChatManager.cs @@ -331,7 +331,7 @@ private async void SendAdminChat(ICommonSession player, string message) return; var payload = new WebhookPayload { - Content = $"***AdminChat***: **{senderName}**: {message}" + Content = $"***AdminChat***: `{player.Name}`[{senderAdmin.Title}]: {message}" }; var identifier = webhookData.ToIdentifier(); await _discord.CreateMessage(identifier, payload);