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

bz_getPlayerIPAddress

From BZFlagWiki
Jump to: navigation, search

const char* bz_getPlayerIPAddress (int playerID)


Returns the player's IP Address.

Parameters:
playerID  -  Player to lookup.
Returns:
The player's IP Address.

Example[edit]

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;