]>
Commit | Line | Data |
---|---|---|
1 | /* new H accounts */ | |
2 | #ifndef HACCOUNT_H | |
3 | #define HACCOUNT_H | |
4 | ||
5 | #include <time.h> | |
6 | ||
7 | #include "../lib/sstring.h" | |
8 | ||
9 | #include "../nick/nick.h" | |
10 | ||
11 | #include "hdef.h" | |
12 | #include "hstat.h" | |
13 | ||
14 | enum | |
15 | { | |
16 | H_ALL_PRIVMSG = 1 << 0, | |
17 | H_ALL_NOTICE = 1 << 1, | |
18 | H_NOSPAM = 1 << 2, | |
19 | H_AUTO_OP = 1 << 3, | |
20 | H_AUTO_VOICE = 1 << 4, | |
21 | H_NO_CMD_ERROR = 1 << 5, | |
22 | H_NO_EXPIRE = 1 << 31 | |
23 | }; | |
24 | ||
25 | #define H_ACCFLAGS_DEFAULT (0) | |
26 | ||
27 | #define HACCOUNT_CONF_COUNT 5 | |
28 | ||
29 | typedef struct haccount_struct | |
30 | { | |
31 | sstring *name; | |
32 | int flags; | |
33 | hlevel level; | |
34 | ||
35 | time_t last_activity; | |
36 | hstat_account *stats; | |
37 | ||
38 | struct haccount_struct *next; | |
39 | } haccount; | |
40 | ||
41 | extern struct haccount_struct *haccounts; | |
42 | ||
43 | haccount *haccount_get_by_name(const char*); | |
44 | haccount *haccount_add(const char*, hlevel); | |
45 | int haccount_del(haccount*); | |
46 | ||
47 | void haccount_clear_inactives(void); | |
48 | ||
49 | void haccount_set_level(haccount*, hlevel); | |
50 | ||
51 | const char *haccount_get_state(haccount*, int); | |
52 | const char *haccount_get_sname(int); | |
53 | ||
54 | int haccount_count(hlevel); | |
55 | ||
56 | #endif |