Table of Contents

Struct ChatPumpKey

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

The relevance key of a pumped chat row: the world, party, guild or tell target it concerns.

public readonly struct ChatPumpKey : IEquatable<ChatPumpKey>
Implements
Inherited Members

Remarks

The same key the pump's SQL filters on (ChatService.FetchPumpAsync): the world column for World, Trade and Discord, the message's first word for Party and Guild, and for a Tell the target's address — the quoted name when the row starts with a quote, otherwise the first word (FishMMO.Shared.ChatTellAddress).

Fields

ID

The world, party or guild ID. Zero for a tell.

public readonly long ID

Field Value

long

Kind

What kind of address this is.

public readonly ChatPumpKeyKind Kind

Field Value

ChatPumpKeyKind

Name

The lower-case tell target. Null for everything else.

public readonly string Name

Field Value

string

Methods

Equals(ChatPumpKey)

public bool Equals(ChatPumpKey other)

Parameters

other ChatPumpKey

Returns

bool

Equals(object)

public override bool Equals(object obj)

Parameters

obj object

Returns

bool

FirstWord(string)

The first space-delimited word of a message, as PostgreSQL's split_part(message, ' ', 1) takes it: everything before the first space, or the whole message when there is none.

public static string FirstWord(string message)

Parameters

message string

Returns

string

GetHashCode()

public override int GetHashCode()

Returns

int

Guild(long)

A guild's key.

public static ChatPumpKey Guild(long guildID)

Parameters

guildID long

Returns

ChatPumpKey

Party(long)

A party's key.

public static ChatPumpKey Party(long partyID)

Parameters

partyID long

Returns

ChatPumpKey

Tell(string)

A tell target's key. The name is lower-cased here so callers cannot disagree.

public static ChatPumpKey Tell(string name)

Parameters

name string

Returns

ChatPumpKey

ToString()

public override string ToString()

Returns

string

World(long)

A world's key.

public static ChatPumpKey World(long worldServerID)

Parameters

worldServerID long

Returns

ChatPumpKey