Obsolete refactor - ConnectedClient to Channel (#24409)

This commit is contained in:
LordCarve
2024-01-22 23:14:13 +01:00
committed by GitHub
parent a9e89ab372
commit 05a2e6b3a2
46 changed files with 111 additions and 111 deletions

View File

@@ -55,7 +55,7 @@ public sealed class MOTDSystem : EntitySystem
return;
var wrappedMessage = Loc.GetString("motd-wrap-message", ("motd", _messageOfTheDay));
_chatManager.ChatMessageToOne(ChatChannel.Server, _messageOfTheDay, wrappedMessage, source: EntityUid.Invalid, hideChat: false, client: player.ConnectedClient);
_chatManager.ChatMessageToOne(ChatChannel.Server, _messageOfTheDay, wrappedMessage, source: EntityUid.Invalid, hideChat: false, client: player.Channel);
}
/// <summary>
@@ -72,7 +72,7 @@ public sealed class MOTDSystem : EntitySystem
var wrappedMessage = Loc.GetString("motd-wrap-message", ("motd", _messageOfTheDay));
shell.WriteLine(wrappedMessage);
if (shell.Player is { } player)
_chatManager.ChatMessageToOne(ChatChannel.Server, _messageOfTheDay, wrappedMessage, source: EntityUid.Invalid, hideChat: false, client: player.ConnectedClient);
_chatManager.ChatMessageToOne(ChatChannel.Server, _messageOfTheDay, wrappedMessage, source: EntityUid.Invalid, hideChat: false, client: player.Channel);
}
#region Event Handlers

View File

@@ -36,12 +36,12 @@ public sealed class SetMotdCommand : LocalizedCommands
if (string.IsNullOrEmpty(motd))
{
shell.WriteLine(Loc.GetString("cmd-set-motd-cleared-motd-message"));
_adminLogManager.Add(LogType.Chat, LogImpact.Low, $"{(player == null ? "LOCALHOST" : player.ConnectedClient.UserName):Player} cleared the MOTD for the server.");
_adminLogManager.Add(LogType.Chat, LogImpact.Low, $"{(player == null ? "LOCALHOST" : player.Channel.UserName):Player} cleared the MOTD for the server.");
}
else
{
shell.WriteLine(Loc.GetString("cmd-set-motd-set-motd-message", ("motd", motd)));
_adminLogManager.Add(LogType.Chat, LogImpact.Low, $"{(player == null ? "LOCALHOST" : player.ConnectedClient.UserName):Player} set the MOTD for the server to \"{motd:motd}\"");
_adminLogManager.Add(LogType.Chat, LogImpact.Low, $"{(player == null ? "LOCALHOST" : player.Channel.UserName):Player} set the MOTD for the server to \"{motd:motd}\"");
}
}