15 client[i] = DEFAULT_CLIENT;
22 if (client[i].fd == fd) {
32 if (client[i].fd != fd) {
36 if (client[i].team_name != NULL) {
37 free(client[i].team_name);
39 client[i] = DEFAULT_CLIENT;
51 if (client[i].team_name != NULL) {
52 free(client[i].team_name);
54 client[i] = DEFAULT_CLIENT;
void delete_all_client(cli_t client[MAX_CLIENT])
The function to delete a every client from the cli_t structure.
int delete_client(cli_t client[MAX_CLIENT], const int fd)
The function to delete a specific client from the cli_t structure by the fd.
int get_client(cli_t client[MAX_CLIENT], const int fd)
The function to get the client index in the structure by the fd.
void init_client(cli_t client[MAX_CLIENT])
The function to initialize the cli_t structure.
A structure to store every client/player data.