-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathplayer_list.h
51 lines (39 loc) · 1.03 KB
/
player_list.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#ifndef __PLAYER_LIST_H__
#define __PLAYER_LIST_H__
#include "compat.h"
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
/* Channel privileges */
#define CHANNEL_PRIV_CHANADMIN 1
#define CHANNEL_PRIV_OP 2
#define CHANNEL_PRIV_VOICE 4
#define CHANNEL_PRIV_AUTOOP 8
#define CHANNEL_PRIV_AUTOVOICE 16
/* Global flags */
#define GLOBAL_FLAG_SERVERADMIN 1
#define GLOBAL_FLAG_ALLOWREG 2
#define GLOBAL_FLAG_REGISTERED 4
/* Player attributes */
/* TODO: what are 1 and 2 ??? */
#define PL_ATTR_BLOCK_WHISPER 4
#define PL_ATTR_AWAY 8
#define PL_ATTR_MUTE_MIC 16
#define PL_ATTR_MUTE_SPK 32
struct player {
uint32_t public_id;
uint32_t channel_id;
uint16_t chan_privileges;
uint16_t global_flags;
uint16_t player_attributes;
char name[29];
};
struct player_list {
struct player * players;
uint32_t size;
};
struct player_list * decode_player_list(void * data);
void print_player_list(struct player_list * pll);
void print_player(struct player * pl);
void * decode_player(void * data, struct player * pl);
#endif