This wiki is archived and useful information is being migrated to the main bzflag.org website
bz_getPlayerIPAddress
From BZFlagWiki
Revision as of 06:18, 19 October 2011 by Sigonasr2 (Talk | contribs) (Removed version 2.99.x requirement. Added an example. IPAddress -> IP Address)
const char* bz_getPlayerIPAddress (int playerID)
Returns the player's IP Address.
Parameters:
playerID - Player to lookup.
Returns:
The player's IP Address.
Example
Tells the administrators a player has joined with the specified callsign and IP Address. (Even though this data is redundant, this is merely an example.)
case bz_ePlayerJoinEvent: { bz_sendTextMessagef(BZ_SERVER,eAdministrators, "%s joined with IP Address %s." ,bz_getPlayerCallsign(((bz_PlayerJoinPartEventData_V1*)eventData)->playerID) ,bz_getPlayerIPAddress(((bz_PlayerJoinPartEventData_V1*)eventData)->playerID)); }break;