]> jfr.im git - irc/quakenet/newserv.git/blob - whowas/whowas.h
whowas: Show usermodes.
[irc/quakenet/newserv.git] / whowas / whowas.h
1 #ifndef __WHOWAS_H
2 #define __WHOWAS_H
3
4 #define WW_MAXAGE 3600
5 #define WW_MAXENTRIES 100000
6 #define WW_MASKLEN (HOSTLEN + USERLEN + NICKLEN)
7 #define WW_REASONLEN 512
8
9 typedef struct whowas {
10 int type;
11 time_t timestamp;
12 nick *nick; /* unlinked nick */
13
14 /* WHOWAS_QUIT or WHOWAS_KILL */
15 sstring *reason;
16
17 /* WHOWAS_RENAME */
18 sstring *newnick;
19
20 unsigned int marker;
21
22 struct whowas *next;
23 struct whowas *prev;
24 } whowas;
25
26 extern whowas *whowas_head, *whowas_tail;
27 extern int whowas_count;
28
29 #define WHOWAS_QUIT 0
30 #define WHOWAS_KILL 1
31 #define WHOWAS_RENAME 2
32
33 whowas *whowas_fromnick(nick *np);
34 nick *whowas_tonick(whowas *ww);
35 void whowas_freenick(nick *np);
36 whowas *whowas_chase(const char *nick, int maxage);
37 const char *whowas_format(whowas *ww);
38 void whowas_free(whowas *ww);
39
40 unsigned int nextwhowasmarker(void);
41
42 #endif /* __WHOWAS_H */