aboutsummaryrefslogtreecommitdiffstats
path: root/FICS/lists.h
blob: f26fcb9d3add607673370f8ccb916e2123fe9629 (plain)
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
/* lists.h
 *
 * Revised by maxxe 23/12/15
 */

#include <stdio.h>

#ifndef _LISTS_H
#define _LISTS_H

#include "command.h" /* param_list */

enum ListWhich {
	L_ADMIN = 0,
	L_REMOVEDCOM,
	L_FILTER,
	L_BAN,
	L_ABUSER,
	L_MUZZLE,
	L_CMUZZLE,
	L_FM,
	L_IM,
	L_GM,
	L_BLIND,
	L_TEAMS,
	L_COMPUTER,
	L_TD,
	L_CENSOR,
	L_GNOTIFY,
	L_NOPLAY,
	L_NOTIFY,
	L_CHANNEL
};

enum ListPerm {
	P_HEAD = 0,
	P_GOD,
	P_ADMIN,
	P_PUBLIC,
	P_PERSONAL
};

typedef struct {
	enum ListPerm	 rights;
	char		*name;
} ListTable;

/*
 * Max names in one list.
 */
#define MAX_GLOBAL_LIST_SIZE 200

typedef struct _List List;

struct _List {
	enum ListWhich	 which;
	int		 numMembers;
	char		*member[MAX_GLOBAL_LIST_SIZE];
	struct _List	*next;
};

extern int	com_addlist(int, param_list);
extern int	com_showlist(int, param_list);
extern int	com_sublist(int, param_list);

extern int	in_list(int, enum ListWhich, char *);
extern int	list_add(int, enum ListWhich, char *);
extern int	list_addsub(int, char *, char *, int);
extern int	list_channels(int, int);
extern int	list_size(int, enum ListWhich);
extern int	list_sub(int, enum ListWhich, char *);
extern int	titled_player(int, char *);
extern void	list_free(List *);
extern void	list_print(FILE *, int, enum ListWhich);

#endif    /* _LISTS_H */