Table of Contents

Class ChatMutePolicy

Namespace
FishMMO.Server.Implementation.World.SceneServer
Assembly
FishMMO.Server.dll

Turns the stored mutes on a character and its account into the one number the chat path tests.

public static class ChatMutePolicy
Inheritance
ChatMutePolicy
Inherited Members

Remarks

Kept apart from the chat system so the combination rule can be tested without a server: either mute silences the character, the later end wins, and a mute with no end beats both.

Fields

NoEnd

The in-memory value for a mute with no end.

public const long NoEnd = 9223372036854775807

Field Value

long

Methods

DescribeForPlayer(long, string, long)

The line a muted player is shown when chat is refused.

public static string DescribeForPlayer(long mutedUntilTicks, string reason, long nowTicks)

Parameters

mutedUntilTicks long
reason string
nowTicks long

Returns

string

Remarks

Says how long is left and why, and where to go. A player refused with no explanation types the message again, and one who is not told they can still file a ticket has no way to ask.

ResolveUntilTicks(CharacterChatMuteState, DateTime, out string)

Resolves when a character's chat is silenced until, as UTC ticks.

public static long ResolveUntilTicks(CharacterChatMuteState state, DateTime utcNow, out string reason)

Parameters

state CharacterChatMuteState

The character's own mute and its account's.

utcNow DateTime

The present, for deciding which mutes have lapsed.

reason string

The reason recorded with whichever mute ends last, or null when not muted.

Returns

long

0 when not muted, NoEnd for a mute with no end, else the end's ticks.