11#ifndef _PEERPLAYERS_H_
12#define _PEERPLAYERS_H_
28#define PI_PING_HISTORY_LEN 4
35 char nick[PI_NICK_MAX_LEN];
36 PEERBool inRoom[NumRooms];
41 PEERBool gotIPAndProfileID;
46 unsigned long lastPingSend;
47 unsigned long lastPingRecv;
48 unsigned long lastXping;
49 PEERBool waitingForPing;
51 int pingsLostConsecutive;
53 int pingHistory[PI_PING_HISTORY_LEN];
66PEERBool piPlayersInit(PEER peer);
67void piPlayersCleanup(PEER peer);
68piPlayer * piPlayerJoinedRoom(PEER peer,
const char * nick, RoomType roomType,
int mode);
69void piPlayerLeftRoom(PEER peer,
const char * nick, RoomType roomType);
70void piPlayerChangedNick(PEER peer,
const char * oldNick,
const char * newNick);
71void piClearRoomPlayers(PEER peer, RoomType roomType);
72piPlayer * piGetPlayer(PEER peer,
const char * nick);
73typedef void (* piEnumRoomPlayersCallback)(PEER peer, RoomType roomType,
piPlayer * player,
int index,
void * param);
74void piEnumRoomPlayers(PEER peer, RoomType roomType, piEnumRoomPlayersCallback callback,
void * param);
75piPlayer * piFindPlayerByIP(PEER peer,
unsigned int IP);
76void piSetPlayerIPAndProfileID(PEER peer,
const char * nick,
unsigned int IP,
int profileID);
77int piParseFlags(
const char * flags);
78void piSetPlayerRoomFlags(PEER peer,
const char * nick, RoomType roomType,
const char * flags);
79void piSetPlayerModeFlags(PEER peer,
const char * nick, RoomType roomType,
int mode);
80PEERBool piIsPlayerVIP(
piPlayer * player, RoomType roomType);
81PEERBool piIsPlayerHost(
piPlayer * player);
82PEERBool piIsPlayerOp(
piPlayer * player);
83piPlayer * piFindPlayerByIndex(PEER peer, RoomType roomType,
int index);
84piPlayer * piFindRoomHost(PEER peer, RoomType roomType);
85piPlayer * piFindRoomOp(PEER peer, RoomType roomType);
86int piCountRoomOps(PEER peer, RoomType roomType,
const char * exclude);
Definition peerPlayers.h:34