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

Difference between revisions of "Bz eGetPlayerInfoEvent"

From BZFlagWiki
Jump to: navigation, search
(New page: {{BZFS_API_Doc}} {{BZFS_API_Events}} {{API_Docs_that_need_work}} ==Overview== The '''bz_eGetPlayerInfoEvent''' is an API event that is called to tell plugins about a new user and find out...)
 
m (Fix typos)
 
(4 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
{{BZFS_API_Doc}}
 
{{BZFS_API_Doc}}
 
{{BZFS_API_Events}}
 
{{BZFS_API_Events}}
{{API_Docs_that_need_work}}
 
  
 
==Overview==
 
==Overview==
The '''bz_eGetPlayerInfoEvent''' is an API event that is called to tell plugins about a new user and find out their permissions. A plugin can use this to modify the state of being administrator, being verified and being registered of every user.
+
The '''bz_eGetPlayerInfoEvent''' is an API event that is called each time the server sends out a player info update message to a remote player.
  
 
==Data==
 
==Data==
Line 20: Line 19:
 
   |playerID
 
   |playerID
 
   |int
 
   |int
   |The identification number of the player
+
   |The playerID the record refers too.
 
   |-
 
   |-
 
   |callsign
 
   |callsign
 
   |[[bz_ApiString]]
 
   |[[bz_ApiString]]
   |The callsign of the player
+
   |The callsign for the player.
 
   |-
 
   |-
 
   |ipAddress
 
   |ipAddress
 
   |[[bz_ApiString]]
 
   |[[bz_ApiString]]
   |The IP address of the player
+
   |The IPv4 address for the player. (not set in 2.4.0, fixed in 2.4.1.)
 
   |-
 
   |-
 
   |team
 
   |team
 
   |[[bz_eTeamType]]
 
   |[[bz_eTeamType]]
   |The team the player belongs to
+
   |The team the player is current only.
 
   |-
 
   |-
 
   |admin
 
   |admin
 
   |bool
 
   |bool
   |This flag is set to true if the player is an administrator.
+
   |The admin permission state of the player, indicating if they will be displayed with an '@' symbol in the scoreboard.
 
   |-
 
   |-
 
   |verified
 
   |verified
 
   |bool
 
   |bool
   |True if the user has authenticated with the login system. Comparable to a user having a "+" in the scoreboard.
+
   |The authentication state of the player, indicating if they will be displayed with an '+' symbol in the scoreboard.
 
   |-
 
   |-
 
   |registered
 
   |registered
 
   |bool
 
   |bool
   |This flag is set to true if the player is registered with the server, as opposed to being verified with the global login system (see the verified flag).
+
   |The state of the player's username. This value is true if the username is registered. If the user is not verified, but registered then they will be displayed with an '-' symbol in the scoreboard.
 
   |-
 
   |-
 
   |eventTime
 
   |eventTime
 
   |double
 
   |double
   |The time of the event
+
   |The local server time of the event.
 
   |}
 
   |}
==Uses==
 
Some data in this event can be modified, namely the following flags: admin, verified, registered. A plugin can, for example, let every other user be an admin.
 
  
[[Category:BZFS_API_Docs]]
+
==Uses==
[[Category:BZFS_API_Events]]
+
This is a modification event. The state members can be changed ( admin, verified, and registered ). Changes to these values only change the data sent to the remote user, they do not change any internal permission states or access permissions. This event is only to allow plug-ins to overide the logic used for the display of the various scoreboard symbols.

Latest revision as of 04:04, 5 January 2017

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_eGetPlayerInfoEvent is an API event that is called each time the server sends out a player info update message to a remote player.

Data[edit]

bz_eGetPlayerInfoEvent returns the bz_GetPlayerInfoEventData_V1 data class.

name type value description
eventType bz_eEventType bz_eGetPlayerInfoEvent
playerID int The playerID the record refers too.
callsign bz_ApiString The callsign for the player.
ipAddress bz_ApiString The IPv4 address for the player. (not set in 2.4.0, fixed in 2.4.1.)
team bz_eTeamType The team the player is current only.
admin bool The admin permission state of the player, indicating if they will be displayed with an '@' symbol in the scoreboard.
verified bool The authentication state of the player, indicating if they will be displayed with an '+' symbol in the scoreboard.
registered bool The state of the player's username. This value is true if the username is registered. If the user is not verified, but registered then they will be displayed with an '-' symbol in the scoreboard.
eventTime double The local server time of the event.

Uses[edit]

This is a modification event. The state members can be changed ( admin, verified, and registered ). Changes to these values only change the data sent to the remote user, they do not change any internal permission states or access permissions. This event is only to allow plug-ins to overide the logic used for the display of the various scoreboard symbols.