This wiki is archived and useful information is being migrated to the main bzflag.org website

Difference between revisions of "Bz eRawChatMessageEvent"

From BZFlagWiki
Jump to: navigation, search
(New page: {{BZFS_API_Doc}} {{BZFS_API_Events}} {{Stub}} ==Overview== The '''bz_eRawChatMessageEvent''' is an API event that is called each time a raw chat message is received. ==Data== '''bz_eRawC...)
 
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
 
{{BZFS_API_Doc}}
 
{{BZFS_API_Doc}}
 
{{BZFS_API_Events}}
 
{{BZFS_API_Events}}
{{Stub}}
 
  
 
==Overview==
 
==Overview==
The '''bz_eRawChatMessageEvent''' is an API event that is called each time a raw chat message is received.
+
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==
 
==Data==
'''bz_eRawChatMessageEvent''' returns the '''<!>''' data class.
+
'''bz_eRawChatMessageEvent''' returns the '''bz_ChatEventData_V1''' data class, this class is shared with the [[bz_eFilteredChatMessageEvent]] event.
  
 
   {| border="1" cellpadding="20" cellspacing="0"
 
   {| border="1" cellpadding="20" cellspacing="0"
Line 16: Line 15:
 
   |eventType     
 
   |eventType     
 
   |[[Event(API)|bz_eEventType]]
 
   |[[Event(API)|bz_eEventType]]
   |bz_eRawChatMessageEvent
+
   |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==
 
==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.
 
+
[[Category:BZFS_API_Docs]]
+
[[Category:BZFS_API_Events]]
+

Latest revision as of 17:39, 28 November 2007

BZFS API Documentation This page contains part of the BZFS API documentation for use by Plug-ins on the BZFS server.

BZFS Event. This page documents a BZFS event that is called by the game server to notify plug-ins of various actions and state changes in the game world.


Overview[edit]

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[edit]

bz_eRawChatMessageEvent returns the bz_ChatEventData_V1 data class, this class is shared with the bz_eFilteredChatMessageEvent event.

name type value description
eventType 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[edit]

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.