This wiki was in read-only mode for many years, but can now be edited again. A lot of information will need to be updated.

Bz eRawChatMessageEvent: Difference between revisions

From BZFlagWiki
Jump to navigation Jump to search
No edit summary
Zehra (talk | contribs)
redirect, since events are in official docs
Tag: New redirect
 
Line 1: Line 1:
{{BZFS_API_Doc}}
#REDIRECT [[Category:BZFS API Docs]]
{{BZFS_API_Events}}
 
==Overview==
The '''bz_eRawChatMessageEvent''' is an API event that is called for each chat message the server receives. It is called before any filtering is done.
 
==Data==
'''bz_eRawChatMessageEvent''' returns the '''bz_ChatEventData_V1''' data class, this class is shared with the [[bz_eFilteredChatMessageEvent]] event.
 
  {| border="1" cellpadding="20" cellspacing="0"
  !name
  !type
  !value description
  |-
  |eventType   
  |[[Event(API)|bz_eEventType]]
  |bz_eRawChatMessageEvent.
  |-
  |from
  |int
  |The player ID sending the message.
  |-
  |to
  |int
  |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.
  |-
  |team
  |[[bz_eTeamType]]
  |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.
  |-
  |message
  |[[bz_ApiString]]
  |The unfiltered text of the message.
  |-
  |eventTime
  |double
  |The time of the event.
  |}
 
==Uses==
This is a modification event. The text of the message can be changed and will be used to send the actual message to all other users. This event is the primary hook for plug-ins that wish to implement custom chat filters.

Latest revision as of 02:26, 27 November 2025