]>
Commit | Line | Data |
---|---|---|
1 | typedef struct jupe_s { | |
2 | struct jupe_s* ju_next; | |
3 | sstring* ju_server; | |
4 | sstring* ju_reason; | |
5 | time_t ju_expire; | |
6 | time_t ju_lastmod; | |
7 | unsigned int ju_flags; | |
8 | } jupe_t; | |
9 | ||
10 | extern jupe_t *jupes; | |
11 | ||
12 | #define JUPE_MAX_EXPIRE 604800 | |
13 | ||
14 | #define JUPE_ACTIVE 0x0001 | |
15 | ||
16 | #define JupeIsRemActive(j) ((j)->ju_flags & JUPE_ACTIVE) | |
17 | ||
18 | #define JupeServer(j) ((j)->ju_server->content) | |
19 | #define JupeReason(j) ((j)->ju_reason->content) | |
20 | #define JupeLastMod(j) ((j)->ju_lastmod) | |
21 | ||
22 | void jupe_propagate(jupe_t *jupe); | |
23 | jupe_t *make_jupe(char *server, char *reason, time_t expirets, time_t lastmod, unsigned int flags); | |
24 | void jupe_free(jupe_t *jupe); | |
25 | ||
26 | /* (public) functions for using/modifying jupes */ | |
27 | jupe_t *jupe_find(char *server); | |
28 | void jupe_activate(jupe_t *jupe); | |
29 | void jupe_deactivate(jupe_t *jupe); | |
30 | int jupe_add(char *server, char *reason, time_t duration, unsigned int flags); | |
31 | void jupe_expire(void); /* call this before directly using the jupes list */ |