OnMatchChat
public MatchChatEventHandler OnMatchChat;
Argument
Value | Type | Description |
---|---|---|
args | MatchChatEventArgs | Chat information |
MatchChatEventArgs
Value | Type | Description |
---|---|---|
ErrInfo | ErrorCode | Error information |
Reason | string | Reason for error |
From | SessionInfo | Information on the session that sent the chat message |
ChatModeType | MatchChatModeType | Chat message type - MatchChatModeType.Team(team) or MatchChatModeType.All(all) |
Message | string | Chat message |
Description
This event handler is called when the server broadcasts a chat message sent from a client.
It is also called when you send a message.
Team message is also broadcasted to all clients.
You must apply a filter in the client to identify whether it is a team message or an all-user message.
In order for an event to be called, the message sending/receiving method must be called.
Example
Backend.Match.OnMatchChat = (MatchChatEventArgs args) => {
// TODO
};
Argument cases
When someone sent an all–user message ErrInfo : ErrorCode.Success Session : "session that sent the chat message" ChatModeType : MatchChatModeType.All
When someone sent a team message ErrInfo : ErrorCode.Success Session : "session that sent the chat message" ChatModeType : MatchChatModeType.Team