Skip to content

Commit

Permalink
FIX
Browse files Browse the repository at this point in the history
  • Loading branch information
Schrodinger71 committed Jun 30, 2024
1 parent efd95aa commit 96a7005
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions Content.Server/Chat/Managers/ChatManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -280,10 +280,9 @@ private void SendAdminChat(ICommonSession player, string message)
}

var clients = _adminManager.ActiveAdmins.Select(p => p.Channel);
var senderAdmin = _adminManager.GetAdminData(player); // Start-ADT Schrodinger Tweak: Отсюда сможем получить инфу о префиксе админа
var senderName = player.Name; // Добавил переменную senderName, в ней содержиться player.Name
senderName += $"\\[{senderAdmin.Title}\\]"; // и приставляем префикс к имени
// End-ADT Tweak
var senderAdmin = _adminManager.GetAdminData(player); // Start-ADT Schrodinger Tweak: Отсюда сможем получить инфу о префиксе админа
var senderName = player.Name + $"\\[{senderAdmin.Title}\\]";; // Добавил переменную senderName, в ней содержиться player.Name и приставляем префикс к имени

Check failure on line 284 in Content.Server/Chat/Managers/ChatManager.cs

View workflow job for this annotation

GitHub Actions / Test Packaging

Dereference of a possibly null reference.

Check failure on line 284 in Content.Server/Chat/Managers/ChatManager.cs

View workflow job for this annotation

GitHub Actions / Test Packaging

Dereference of a possibly null reference.

Check failure on line 284 in Content.Server/Chat/Managers/ChatManager.cs

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest)

Dereference of a possibly null reference.

Check failure on line 284 in Content.Server/Chat/Managers/ChatManager.cs

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest)

Dereference of a possibly null reference.

Check failure on line 284 in Content.Server/Chat/Managers/ChatManager.cs

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest)

Dereference of a possibly null reference.

Check failure on line 284 in Content.Server/Chat/Managers/ChatManager.cs

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest)

Dereference of a possibly null reference.
// End-ADT Tweak
var wrappedMessage = Loc.GetString("chat-manager-send-admin-chat-wrap-message",
("adminChannelName", Loc.GetString("chat-manager-admin-channel-name")),
("playerName", senderName), ("message", FormattedMessage.EscapeText(message))); // ADT Tweak тут заменил player.Name на senderName
Expand Down

0 comments on commit 96a7005

Please sign in to comment.