]> jfr.im git - irc/quakenet/newserv.git/blob - helpmod2/hcensor.h
Minor bugfixes
[irc/quakenet/newserv.git] / helpmod2 / hcensor.h
1 #ifndef HCENSOR_H
2 #define HCENSOR_H
3
4 #include "../lib/sstring.h"
5
6 /* forward declarations */
7 struct hchannel_struct;
8 struct huser_struct;
9
10 typedef struct hcensor_struct
11 {
12 sstring *pattern;
13 sstring *reason; /* optional */
14 struct hcensor_struct *next;
15 } hcensor;
16
17 hcensor *hcensor_get_by_pattern(hcensor *, const char *);
18 hcensor *hcensor_get_by_index(hcensor *, int);
19 hcensor *hcensor_check(hcensor *, const char *); /* first matching pattern is returned, NULL if ok */
20 hcensor *hcensor_add(hcensor **, const char*, const char*);
21 hcensor *hcensor_del(hcensor **, hcensor *);
22 /* Handle a censor match, if returnvalue is non-zero then the user was removed from channel */
23 int hcensor_match(struct hchannel_struct*, struct huser_struct*, hcensor*);
24 int hcensor_count(hcensor *);
25
26 void hcensor_del_all(hcensor **);
27
28 #endif