Table of Contents

Struct PluginChatMessage

Namespace
AcDream.Plugin.Abstractions
Assembly
AcDream.Plugin.Abstractions.dll

One line of the client's text, as a plugin sees it.

public readonly record struct PluginChatMessage : IEquatable<PluginChatMessage>
Implements
Inherited Members

Constructors

PluginChatMessage(ulong, uint, int, string, string, string)

One line of the client's text, as a plugin sees it.

public PluginChatMessage(ulong Sequence, uint SenderObjectId, int Kind, string Sender, string Text, string ChannelName)

Parameters

Sequence ulong

The host's counter for this line.

SenderObjectId uint

The object that said it, or 0 without a speaker.

Kind int

The line kind.

Sender string

The speaker's name.

Text string

The line itself.

ChannelName string

The channel name, when applicable.

Fields

StatusTextKind

The Kind carried by a short status notice shown over the world instead of being written into the transcript. It sits above every transcript kind so the two can never collide.

public const int StatusTextKind = 100

Field Value

int

Properties

ChannelId

The number of the channel a channel line (Kind 2) came on, and 0 on every other line. The fixed channels have no name on the wire and are told apart by this number alone: 0x800 fellowship, 0x1000 from a patron, 0x2000 from a vassal, 0x4000 from a follower, 0x1000000 co-vassals, 0x2000000 allegiance broadcast, 0x4000000 a fellowship broadcast, 0x8, 0x10 and 0x20 the advocate channels. A named channel carries its room number here and its name in ChannelName.

public uint ChannelId { get; init; }

Property Value

uint

ChannelName

The channel name, when applicable.

public string ChannelName { get; init; }

Property Value

string

CombatKind

Sub-kind of a combat line: 0 when the line is not one, 1 for an ordinary outgoing line, 2 for an incoming one, 3 for a failure.

public int CombatKind { get; init; }

Property Value

int

DisplayText

The whole line as the client's chat window prints it: the channel prefix, the speaker, the verb and the quoted words, with another player's name wrapped in the client's tell link (<Tell:IIDString:id:Name>Name<\Tell>). It carries no timestamp and no closing line break. Empty on a line the host did not word. A chat filter is offered the line before the language filter runs, so there this and Text are the words as they arrived; every reader afterwards gets both as printed, with the language filter's **** in place when that option is on.

public string DisplayText { get; init; }

Property Value

string

Kind

The line kind.

public int Kind { get; init; }

Property Value

int

LogTextType

The text class the client colours the line by. A plugin printing its own line passes the same value to PostMessage(string, int).

public int LogTextType { get; init; }

Property Value

int

Received

When the client took delivery of the line.

public DateTimeOffset Received { get; init; }

Property Value

DateTimeOffset

Sender

The speaker's name.

public string Sender { get; init; }

Property Value

string

SenderObjectId

The object that said it, or 0 without a speaker.

public uint SenderObjectId { get; init; }

Property Value

uint

Sequence

The host's counter for this line.

public ulong Sequence { get; init; }

Property Value

ulong

Text

The line itself.

public string Text { get; init; }

Property Value

string