public sealed class ChatRouterWhat a player says, checked once and fanned out once.
Remarks
Server-side, before fan-out, with the reason returned to the sender — doc 28's sentence, and the ordering in it is the design. A client that filtered its own outgoing messages is a client; a rejection the sender is not told about is a player who thinks the server has hung.
⚠ A block drops the recipient on a fan-out channel and the message on a direct one. Blocking somebody cannot silence them in a zone everybody else can hear — that is a moderator's job — so what a block does to zone chat is stop you seeing it, which is a per-recipient decision made here rather than a rejection made to the sender.
Fields and properties (4)
public ChatLibrary LibraryWhere the channels come from.
public ChatPipeline PipelineWhat every message goes through.
public IChatAudience AudienceWho can hear each channel.
public ulong DeliveredHow many messages have gone out.
Events (1)
public Action<ChatDelivery>? SentRaised for every message that goes out.
Methods (2)
public ChatRouter(ChatLibrary library, ChatPipeline pipeline, IChatAudience audience)Makes a router.
public ChatDelivery Say(PlayerId sender, DefId channel, string text, IChatContext context, DefId scene = default(DefId), PlayerId recipient = default(PlayerId))Says something.
Used by (1)
- ChatRouterTestsVixen.Gameplay.Chat.Tests