]> jfr.im git - irc/quakenet/newserv.git/blob - whowas/whowas.h
Implement nick chasing for the block command.
[irc/quakenet/newserv.git] / whowas / whowas.h
1 #define WW_MAXAGE 3600
2 #define WW_MAXENTRIES 100000
3 #define WW_MASKLEN (HOSTLEN + USERLEN + NICKLEN)
4 #define WW_REASONLEN 512
5
6 typedef struct whowas {
7 time_t seen;
8 char nick[NICKLEN + 1];
9 char ident[USERLEN + 1];
10 char host[HOSTLEN + 1];
11 struct irc_in_addr ip;
12 char realname[REALLEN + 1];
13
14 int type;
15
16 /* WHOWAS_QUIT or WHOWAS_KILL */
17 sstring *reason;
18
19 /* WHOWAS_RENAME */
20 sstring *newnick;
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 whowas *whowas_chase(const char *nick, int maxage);
35 void whowas_spew(whowas *ww, nick *np);
36 void whowas_free(whowas *ww);