Files
tbd-station-14/Content.Server/Chat/Managers/IChatManager.cs
Repo 90d3699c1d Fix gamerule display issues (#28178)
* A comprehensive rule list for joining admins and mid round command to get rule list added

* Fix up for when a rule is added vs started and some logging

* fix command help localization, fix admin flags and spam anouncement.

* Send admin message only to the joining player not all admins.

* Bit better formatting in chat box
2024-05-25 16:18:05 -04:00

56 lines
2.9 KiB
C#

using System.Diagnostics.CodeAnalysis;
using Content.Shared.Administration;
using Content.Shared.Chat;
using Robust.Shared.Network;
using Robust.Shared.Player;
namespace Content.Server.Chat.Managers
{
public interface IChatManager
{
void Initialize();
/// <summary>
/// Dispatch a server announcement to every connected player.
/// </summary>
/// <param name="message"></param>
/// <param name="colorOverride">Override the color of the message being sent.</param>
void DispatchServerAnnouncement(string message, Color? colorOverride = null);
void DispatchServerMessage(ICommonSession player, string message, bool suppressLog = false);
void TrySendOOCMessage(ICommonSession player, string message, OOCChatType type);
void SendHookOOC(string sender, string message);
void SendAdminAnnouncement(string message, AdminFlags? flagBlacklist = null, AdminFlags? flagWhitelist = null);
void SendAdminAnnouncementMessage(ICommonSession player, string message, bool suppressLog = true);
void SendAdminAlert(string message);
void SendAdminAlert(EntityUid player, string message);
void ChatMessageToOne(ChatChannel channel, string message, string wrappedMessage, EntityUid source, bool hideChat,
INetChannel client, Color? colorOverride = null, bool recordReplay = false, string? audioPath = null, float audioVolume = 0, NetUserId? author = null);
void ChatMessageToMany(ChatChannel channel, string message, string wrappedMessage, EntityUid source, bool hideChat, bool recordReplay,
IEnumerable<INetChannel> clients, Color? colorOverride = null, string? audioPath = null, float audioVolume = 0, NetUserId? author = null);
void ChatMessageToManyFiltered(Filter filter, ChatChannel channel, string message, string wrappedMessage, EntityUid source, bool hideChat, bool recordReplay, Color? colorOverride, string? audioPath = null, float audioVolume = 0);
void ChatMessageToAll(ChatChannel channel, string message, string wrappedMessage, EntityUid source, bool hideChat, bool recordReplay, Color? colorOverride = null, string? audioPath = null, float audioVolume = 0, NetUserId? author = null);
bool MessageCharacterLimit(ICommonSession player, string message);
void DeleteMessagesBy(ICommonSession player);
[return: NotNullIfNotNull(nameof(author))]
ChatUser? EnsurePlayer(NetUserId? author);
/// <summary>
/// Called when a player sends a chat message to handle rate limits.
/// Will update counts and do necessary actions if breached.
/// </summary>
/// <param name="player">The player sending a chat message.</param>
/// <returns>False if the player has violated rate limits and should be blocked from sending further messages.</returns>
bool HandleRateLimit(ICommonSession player);
}
}