]> jfr.im git - irc/quakenet/newserv.git/blame - helpmod2/hban.h
Large reorganisation of all Makefiles, including new configure script.
[irc/quakenet/newserv.git] / helpmod2 / hban.h
CommitLineData
c86edd1d
Q
1#ifndef HBAN_H
2#define HBAN_H
3
4#include <time.h>
5
6#include "../channel/channel.h"
c86edd1d 7#include "../nick/nick.h"
c86edd1d
Q
8#include "../lib/sstring.h"
9
e908ecfa 10/* Forward declarations */
11struct huser_struct;
12
c86edd1d
Q
13typedef struct hban_struct
14{
15 chanban *real_ban;
16 sstring *reason;
17 time_t expiration;
18
19 struct hban_struct *next;
20} hban;
21
22enum
23{
24 HBAN_NICK = 1 << 0,
25 HBAN_IDENT = 1 << 1,
26 HBAN_HOST = 1 << 2,
27 HBAN_REAL_HOST = 1 << 3
28};
29
30extern hban* hbans;
31
32hban *hban_add(const char*, const char*, time_t, int);
33hban *hban_del(hban*, int);
34hban *hban_get(const char*);
35
36int hban_count(void);
37/* the first parameter is huser* */
e908ecfa 38hban *hban_huser(struct huser_struct*, const char*, time_t, int);
c86edd1d
Q
39
40hban *hban_check(nick*);
41
42void hban_remove_expired(void);
43
44void hban_del_all(void);
45
46const char *hban_get_reason(hban*);
47
48const char *hban_ban_string(nick*, int);
49
50#endif