C# Класс fCraft.Chat

Helper class for handling player-generated chat.
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
EmoteKeywords char>.Dictionary
Swears List
badWordMatchers IEnumerable

Открытые методы

Метод Описание
ContainsInvalidChars ( string message ) : bool

Checks for unprintable or illegal characters in a message.

SendAdmin ( Player player, string rawMessage ) : bool
SendCustom ( Player player, string rawMessage ) : bool
SendGlobal ( [ player, [ rawMessage ) : bool

Sends a global (white) chat.

SendMe ( [ player, [ rawMessage ) : bool

Sends an action message (/Me).

SendPM ( [ from, [ to, [ rawMessage ) : bool

Sends a private message (PM). Does NOT send a copy of the message to the sender.

SendRank ( [ player, [ rank, [ rawMessage ) : bool

Sends a rank-wide message (@@Rank message).

SendSay ( [ player, [ rawMessage ) : bool

Sends a global announcement (/Say).

SendStaff ( [ player, [ rawMessage ) : bool

Sends a staff message (/Staff).

Приватные методы

Метод Описание
GetRawMessageType ( string message ) : RawMessageType

Determines the type of player-supplies message based on its syntax.

RaiseSendingEvent ( ChatSendingEventArgs args ) : bool
RaiseSentEvent ( ChatSendingEventArgs args, int count ) : void
ReplaceEmoteKeywords ( [ message ) : string
ReplaceEmotesWithUncode ( [ input ) : string
ReplaceNewlines ( [ message ) : string
ReplacePercentColorCodes ( [ message, bool allowNewlines ) : string
ReplaceTextKeywords ( [ player, [ input ) : string
ReplaceUncodeWithEmotes ( [ input ) : string
SendInternal ( [ e ) : bool
StripEmotes ( [ message ) : string
StripNewlines ( [ message ) : string
UnescapeBackslashes ( [ message ) : string

Описание методов

ContainsInvalidChars() публичный статический Метод

Checks for unprintable or illegal characters in a message.
public static ContainsInvalidChars ( string message ) : bool
message string Message to check.
Результат bool

SendAdmin() публичный статический Метод

public static SendAdmin ( Player player, string rawMessage ) : bool
player Player
rawMessage string
Результат bool

SendCustom() публичный статический Метод

public static SendCustom ( Player player, string rawMessage ) : bool
player Player
rawMessage string
Результат bool

SendGlobal() публичный статический Метод

Sends a global (white) chat.
public static SendGlobal ( [ player, [ rawMessage ) : bool
player [ Player writing the message.
rawMessage [ Message text.
Результат bool

SendMe() публичный статический Метод

Sends an action message (/Me).
public static SendMe ( [ player, [ rawMessage ) : bool
player [ Player writing the message.
rawMessage [ Message text.
Результат bool

SendPM() публичный статический Метод

Sends a private message (PM). Does NOT send a copy of the message to the sender.
public static SendPM ( [ from, [ to, [ rawMessage ) : bool
from [ Sender player.
to [ Recepient player.
rawMessage [ Message text.
Результат bool

SendRank() публичный статический Метод

Sends a rank-wide message (@@Rank message).
public static SendRank ( [ player, [ rank, [ rawMessage ) : bool
player [ Player writing the message.
rank [ Target rank.
rawMessage [ Message text.
Результат bool

SendSay() публичный статический Метод

Sends a global announcement (/Say).
public static SendSay ( [ player, [ rawMessage ) : bool
player [ Player writing the message.
rawMessage [ Message text.
Результат bool

SendStaff() публичный статический Метод

Sends a staff message (/Staff).
public static SendStaff ( [ player, [ rawMessage ) : bool
player [ Player writing the message.
rawMessage [ Message text.
Результат bool

Описание свойств

EmoteKeywords публичное статическое свойство

List of chat keywords, and emotes that they stand for.
public static Dictionary EmoteKeywords
Результат char>.Dictionary

Swears публичное статическое свойство

public static List Swears
Результат List

badWordMatchers публичное статическое свойство

public static IEnumerable badWordMatchers
Результат IEnumerable