]>
Commit | Line | Data |
---|---|---|
1 | #include "../nick/nick.h" | |
2 | #include "../channel/channel.h" | |
3 | ||
4 | typedef struct { | |
5 | sstring *pattern; | |
6 | sstring *reason; | |
7 | ||
8 | sstring *creator; | |
9 | time_t created; | |
10 | time_t expires; | |
11 | } rq_block; | |
12 | ||
13 | extern array rqblocks; | |
14 | ||
15 | #define RQ_BLOCKFILE "data/rqblocks" | |
16 | #define RQ_BLOCKLEN 256 | |
17 | ||
18 | int rq_initblocks(void); | |
19 | void rq_finiblocks(void); | |
20 | ||
21 | int rq_loadblocks(void); | |
22 | int rq_saveblocks(void); | |
23 | ||
24 | /* long-term blocks */ | |
25 | rq_block *rq_findblock(const char *pattern); | |
26 | void rq_addblock(const char *pattern, const char *reason, const char *creator, time_t created, time_t expires); | |
27 | int rq_removeblock(const char *pattern); |