Skip to Content

bz_eRawChatMessageEvent

This event is called for each chat message the server receives. It is called before any filtering is done.

Data Object Type

2.4.4 bz_ChatEventData_V2

Deprecated Types

These data object types have been deprecated in favor of more recent versions, which contain more or corrected information.

  • 2.4.0 bz_ChatEventData_V1

Parameters

These are the values accessible in the bz_EventData variable that's made available in the Event method.

Data Type Name Description
int from

The player ID sending the message.

int to

The player ID that the message is to if the message is to an individual, or a broadcast. If the message is a broadcast the id will be BZ_ALLUSERS.

bz_eTeamType team

The team the message is for if it not for an individual or a broadcast. If it is not a team message the team will be eNoTeam.

bz_ApiString message

The original content of the message before any filtering happens.

bz_eMessageType messageType

The type of message being sent

double eventTime

The time of the event.

Plug-in Usage

Here's a list of plug-ins part of the official distribution that makes use of this event:

Plug-in Example

This block of code can be used to get started when implementing the Event() function of your plug-in.

bz_ChatEventData_V2* dataObject = (bz_ChatEventData_V2*)eventData;

// Data
// ---
// (int)          from - The player ID sending the message.
// (int)          to - The player ID that the message is to if the message is to an individual, or a broadcast. If the message is a broadcast the id will be BZ_ALLUSERS.
// (bz_eTeamType) team - The team the message is for if it not for an individual or a broadcast. If it is not a team message the team will be eNoTeam.
// (bz_ApiString) message - The original content of the message before any filtering happens.
// (bz_eMessageType) messageType - The type of message being sent
// (double)       eventTime - The time of the event.

Other Chat Events

Back to bzfs API Events

This content is maintained on GitHub. We welcome any feedback and improvements!

Give us Feedback Edit this Page