peerIsPlayerHost

GameSpy SDK

peerIsPlayerHost

Returns PEERTrue if specified player is a room host or operator.

PEERBool peerIsPlayerHost(
PEER peer,
const gsi_char * nick,
RoomType roomType );
RoutineRequired HeaderDistribution
peerIsPlayerHost<peer.h>SDKZIP

Return Value

This function returns PEERTrue if the specified player is a room host or operator.  PEERFalse otherwise.

Parameters

peer
[in] Initialized peer object.
nick
[in] Nickname of the target player.
roomType
[in] Can be either TitleRoom, GroupRoom or StagingRoom.

Remarks

The peerIsPlayerHost function checks whether the player that the nick refers to is the host or operator of the room. It returns PEERFalse if that player isn't a host or operator. This simply is a shortcut to obtaining the player's flags, e.g. the flags PEER_FLAG_HOST and PEER_FLAG_OP. This function will fail if no title is set and the peer object is not connected.

Unicode Mappings

RoutineGSI_UNICODE Not DefinedGSI_UNICODE Defined
peerIsPlayerHostpeerIsPlayerHostApeerIsPlayerHostW

peerIsPlayerHostW and peerIsPlayerHostA are UNICODE and ANSI mapped versions of peerIsPlayerHost. The arguments of peerIsPlayerHostA are ANSI strings; those of peerIsPlayerHostW are wide-character strings.

Section Reference: Gamespy Peer SDK