Struct ChatState
A player's chat state, on the player's Core entity: the repeat filter, the rate gate and any mute. Each spawn gets a fresh one from the ChatModule, so nothing carries over a pooled character.
public struct ChatState
- Inherited Members
Remarks
The tick fields start at zero, meaning "never": no gap pending, no refill yet. Each side keeps them on its own clock (the server on its monotonic clock, the client on the wall clock), so a starting value taken from either clock would be wrong for the other: a wall-clock stamp read by the server's monotonic gate refused every line.
Fields
IsFull
Server: true while the bucket is in its starting full state (no refill applied yet), so the first
refill fills to capacity. Replaced a double.MaxValue sentinel that overflowed to Infinity on the
first add.
public bool IsFull
Field Value
LastMessage
The last line sent, for refusing an exact repeat.
public string LastMessage
Field Value
LastRefillTicks
Server: monotonic ticks of the last bucket refill.
public long LastRefillTicks
Field Value
MuteReason
Server: why the player is muted, for telling them; null when not muted.
public string MuteReason
Field Value
MutedUntilTicks
Server: UTC ticks until which the player's chat is muted: 0 when not muted, long.MaxValue for a
mute with no end. Never written to the spawn payload. Resolved from the character's own mute and its
account's when the character loads, and refreshed by the operator command that changes either; held as
ticks so the chat path's test is one comparison against the stamp the message already carries.
public long MutedUntilTicks
Field Value
NextMessageTicks
Ticks before which the next line is refused by the minimum gap, on the clock of the side that keeps it: the server's monotonic clock, the client's wall clock. Zero is "no gap pending".
public long NextMessageTicks
Field Value
Tokens
Server: tokens in the anti-spam bucket (a double, for precision on long-uptime servers); one is spent per line, and below one the line is dropped.
public double Tokens