Add voice changer logs (#14040)
* add set voice log * add used identity to chat message logs * please tell me there's a better way
This commit is contained in:
@@ -307,9 +307,21 @@ public sealed partial class ChatSystem : SharedChatSystem
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
if (originalMessage == message)
|
if (originalMessage == message)
|
||||||
_adminLogger.Add(LogType.Chat, LogImpact.Low, $"Say from {ToPrettyString(source):user}: {originalMessage}.");
|
{
|
||||||
|
if (name != Name(source))
|
||||||
|
_adminLogger.Add(LogType.Chat, LogImpact.Low, $"Say from {ToPrettyString(source):user} as {name}: {originalMessage}.");
|
||||||
else
|
else
|
||||||
_adminLogger.Add(LogType.Chat, LogImpact.Low, $"Say from {ToPrettyString(source):user}, original: {originalMessage}, transformed: {message}.");
|
_adminLogger.Add(LogType.Chat, LogImpact.Low, $"Say from {ToPrettyString(source):user}: {originalMessage}.");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (name != Name(source))
|
||||||
|
_adminLogger.Add(LogType.Chat, LogImpact.Low,
|
||||||
|
$"Say from {ToPrettyString(source):user} as {name}, original: {originalMessage}, transformed: {message}.");
|
||||||
|
else
|
||||||
|
_adminLogger.Add(LogType.Chat, LogImpact.Low,
|
||||||
|
$"Say from {ToPrettyString(source):user}, original: {originalMessage}, transformed: {message}.");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void SendEntityWhisper(EntityUid source, string originalMessage, bool hideChat, bool hideGlobalGhostChat, RadioChannelPrototype? channel, string? nameOverride)
|
private void SendEntityWhisper(EntityUid source, string originalMessage, bool hideChat, bool hideGlobalGhostChat, RadioChannelPrototype? channel, string? nameOverride)
|
||||||
@@ -366,9 +378,21 @@ public sealed partial class ChatSystem : SharedChatSystem
|
|||||||
RaiseLocalEvent(source, ev, true);
|
RaiseLocalEvent(source, ev, true);
|
||||||
|
|
||||||
if (originalMessage == message)
|
if (originalMessage == message)
|
||||||
_adminLogger.Add(LogType.Chat, LogImpact.Low, $"Whisper from {ToPrettyString(source):user}: {originalMessage}.");
|
{
|
||||||
|
if (name != Name(source))
|
||||||
|
_adminLogger.Add(LogType.Chat, LogImpact.Low, $"Whisper from {ToPrettyString(source):user} as {name}: {originalMessage}.");
|
||||||
else
|
else
|
||||||
_adminLogger.Add(LogType.Chat, LogImpact.Low, $"Whisper from {ToPrettyString(source):user}, original: {originalMessage}, transformed: {message}.");
|
_adminLogger.Add(LogType.Chat, LogImpact.Low, $"Whisper from {ToPrettyString(source):user}: {originalMessage}.");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (name != Name(source))
|
||||||
|
_adminLogger.Add(LogType.Chat, LogImpact.Low,
|
||||||
|
$"Whisper from {ToPrettyString(source):user} as {name}, original: {originalMessage}, transformed: {message}.");
|
||||||
|
else
|
||||||
|
_adminLogger.Add(LogType.Chat, LogImpact.Low,
|
||||||
|
$"Whisper from {ToPrettyString(source):user}, original: {originalMessage}, transformed: {message}.");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void SendEntityEmote(EntityUid source, string action, bool hideChat,
|
private void SendEntityEmote(EntityUid source, string action, bool hideChat,
|
||||||
@@ -387,6 +411,10 @@ public sealed partial class ChatSystem : SharedChatSystem
|
|||||||
if (checkEmote)
|
if (checkEmote)
|
||||||
TryEmoteChatInput(source, action);
|
TryEmoteChatInput(source, action);
|
||||||
SendInVoiceRange(ChatChannel.Emotes, action, wrappedMessage, source, hideChat, hideGlobalGhostChat);
|
SendInVoiceRange(ChatChannel.Emotes, action, wrappedMessage, source, hideChat, hideGlobalGhostChat);
|
||||||
|
|
||||||
|
if (name != Name(source))
|
||||||
|
_adminLogger.Add(LogType.Chat, LogImpact.Low, $"Emote from {ToPrettyString(source):user} as {name}: {action}");
|
||||||
|
else
|
||||||
_adminLogger.Add(LogType.Chat, LogImpact.Low, $"Emote from {ToPrettyString(source):user}: {action}");
|
_adminLogger.Add(LogType.Chat, LogImpact.Low, $"Emote from {ToPrettyString(source):user}: {action}");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -86,7 +86,10 @@ public sealed class RadioSystem : EntitySystem
|
|||||||
RaiseLocalEvent(radio.Owner, ev);
|
RaiseLocalEvent(radio.Owner, ev);
|
||||||
}
|
}
|
||||||
|
|
||||||
_adminLogger.Add(LogType.Chat, LogImpact.Low, $"Radio message from {ToPrettyString(source):sender} on {channel.LocalizedName}: {message}");
|
if (name != Name(source))
|
||||||
|
_adminLogger.Add(LogType.Chat, LogImpact.Low, $"Radio message from {ToPrettyString(source):user} as {name} on {channel.LocalizedName}: {message}");
|
||||||
|
else
|
||||||
|
_adminLogger.Add(LogType.Chat, LogImpact.Low, $"Radio message from {ToPrettyString(source):user} on {channel.LocalizedName}: {message}");
|
||||||
|
|
||||||
_replay.QueueReplayMessage(chat);
|
_replay.QueueReplayMessage(chat);
|
||||||
_messages.Remove(message);
|
_messages.Remove(message);
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
|
using Content.Server.Administration.Logs;
|
||||||
using Content.Server.Chat.Systems;
|
using Content.Server.Chat.Systems;
|
||||||
using Content.Server.Popups;
|
using Content.Server.Popups;
|
||||||
using Content.Shared.Actions;
|
using Content.Shared.Actions;
|
||||||
|
using Content.Shared.Database;
|
||||||
using Content.Shared.Inventory.Events;
|
using Content.Shared.Inventory.Events;
|
||||||
using Content.Shared.Preferences;
|
using Content.Shared.Preferences;
|
||||||
using Content.Shared.Verbs;
|
using Content.Shared.Verbs;
|
||||||
@@ -14,6 +16,7 @@ public sealed partial class VoiceMaskSystem : EntitySystem
|
|||||||
{
|
{
|
||||||
[Dependency] private readonly UserInterfaceSystem _uiSystem = default!;
|
[Dependency] private readonly UserInterfaceSystem _uiSystem = default!;
|
||||||
[Dependency] private readonly PopupSystem _popupSystem = default!;
|
[Dependency] private readonly PopupSystem _popupSystem = default!;
|
||||||
|
[Dependency] private readonly IAdminLogManager _adminLogger = default!;
|
||||||
|
|
||||||
public override void Initialize()
|
public override void Initialize()
|
||||||
{
|
{
|
||||||
@@ -39,6 +42,10 @@ public sealed partial class VoiceMaskSystem : EntitySystem
|
|||||||
}
|
}
|
||||||
|
|
||||||
component.VoiceName = message.Name;
|
component.VoiceName = message.Name;
|
||||||
|
if (message.Session.AttachedEntity != null)
|
||||||
|
_adminLogger.Add(LogType.Action, LogImpact.Medium, $"{ToPrettyString(message.Session.AttachedEntity.Value):player} set voice of {ToPrettyString(uid):mask}: {component.VoiceName}");
|
||||||
|
else
|
||||||
|
_adminLogger.Add(LogType.Action, LogImpact.Medium, $"Voice of {ToPrettyString(uid):mask} set: {component.VoiceName}");
|
||||||
|
|
||||||
_popupSystem.PopupCursor(Loc.GetString("voice-mask-popup-success"), message.Session);
|
_popupSystem.PopupCursor(Loc.GetString("voice-mask-popup-success"), message.Session);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user