bz eAllowPlayer

From BZFlagWiki
Revision as of 21:33, 30 November 2007 by Tulcod (Talk | contribs) (New page: {{BZFS_API_Doc}} {{BZFS_API_Events}} {{API_Docs_that_need_work}} ==Overview== The '''bz_eAllowPlayer''' is an API event that is called each time a player joins to allow a plug-in to overr...)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
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.

Picture Frame.png This page contains API documentation that needs to be reviewed and cleaned up. The information presented here is most likely correct but has not been verified, or may refer to an older version of the API.


Overview

The bz_eAllowPlayer is an API event that is called each time a player joins to allow a plug-in to override the servers allow or deny choice.

Data

bz_eAllowPlayer returns the bz_AllowPlayerEventData_V1 data class.

name type value description
eventType bz_eEventType bz_eAllowPlayer
playerID int Each client has a player ID, even if that client is not yet in the game yet. This way, every client can be identified using an integer value.
callsign bz_ApiString The player's callsign
ipAddress bz_ApiString The IP address of the client which is trying to get into the game
reason bz_ApiString If a plugin denies the entrance of a player, then that plugin can explain why in this field.
allow bool This value should be set to true by the plugin if that plugin decided to allow the player to enter the game, and false otherwise.
eventTime double This value is the time at which the client requested to enter the game (and thus the event was created).

Uses

A plugin can use this event to use an alternative to a ban list to decide whether a user should be allowed to play on the server. For example, if the server load is temporarily high, then a plugin could deny the entrance of even more users temporarily.