]> jfr.im git - irc/quakenet/newserv.git/blame - jupe/jupe.h
A4STATS: remove E style escapes and switch to createtable for indices
[irc/quakenet/newserv.git] / jupe / jupe.h
CommitLineData
01250ca8
P
1typedef 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
10extern jupe_t *jupes;
11
de3ab89e 12#define JUPE_MAX_EXPIRE 6048000
01250ca8
P
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
22void jupe_propagate(jupe_t *jupe);
23jupe_t *make_jupe(char *server, char *reason, time_t expirets, time_t lastmod, unsigned int flags);
24void jupe_free(jupe_t *jupe);
25
26/* (public) functions for using/modifying jupes */
27jupe_t *jupe_find(char *server);
28void jupe_activate(jupe_t *jupe);
29void jupe_deactivate(jupe_t *jupe);
30int jupe_add(char *server, char *reason, time_t duration, unsigned int flags);
31void jupe_expire(void); /* call this before directly using the jupes list */