Skip to content

Commit

Permalink
ООС админам
Browse files Browse the repository at this point in the history
  • Loading branch information
Evgencheg committed Sep 27, 2024
1 parent b6dc50d commit 51be137
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
12 changes: 12 additions & 0 deletions Content.Server/Chat/Managers/ChatManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,18 @@ private void SendOOC(ICommonSession player, string message)
}
#endif

// c4llv07e fix admins OOC names {{
var adminData = _adminManager.GetAdminData(player);
if (adminData != null)
{
var title = adminData.Title ?? "Admin";
// We don't use admin color here because it will be overrided anyway
wrappedMessage = Loc.GetString(
"chat-manager-send-ooc-admin-wrap-message", ("adminTitle", title),
("playerName", player.Name), ("message", FormattedMessage.EscapeText(message)));
}
// c4llv07e }}

//TODO: player.Name color, this will need to change the structure of the MsgChatMessage
ChatMessageToAll(ChatChannel.OOC, message, wrappedMessage, EntityUid.Invalid, hideChat: false, recordReplay: true, colorOverride: colorOverride, author: player.UserId);
_mommiLink.SendOOCMessage(player.Name, message);
Expand Down
1 change: 1 addition & 0 deletions Resources/Locale/ru-RU/chat/managers/chat-manager.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ chat-manager-entity-whisper-unknown-wrap-message = [font size=11][italic][Bubble
chat-manager-entity-me-wrap-message = [italic]{ $entityName } { $message }[/italic]
chat-manager-entity-looc-wrap-message = LOOC: [bold]{ $entityName }:[/bold] { $message }
chat-manager-send-ooc-wrap-message = OOC: [bold]{ $playerName }:[/bold] { $message }
chat-manager-send-ooc-admin-wrap-message = OOC: [bold]\[{ $adminTitle }\] { $playerName }:[/bold] { $message }
chat-manager-send-dead-chat-wrap-message = { $deadChannelName }: [bold][BubbleHeader]{ $playerName }[/BubbleHeader]:[/bold] [BubbleContent]{ $message }[/BubbleContent]
chat-manager-send-ooc-patron-wrap-message = OOC: [bold][color={ $patronColor }]{ $playerName }[/color]:[/bold] { $message }
chat-manager-send-admin-dead-chat-wrap-message = { $adminChannelName }: [bold]([BubbleHeader]{ $userName }[/BubbleHeader]):[/bold] [BubbleContent]{ $message }[/BubbleContent]
Expand Down

0 comments on commit 51be137

Please sign in to comment.