addition of silc.css
[crypto.git] / apps / irssi / src / core / ignore.h
1 #ifndef __IGNORE_H
2 #define __IGNORE_H
3
4 #ifdef HAVE_REGEX_H
5 #  include <regex.h>
6 #endif
7
8 typedef struct {
9         int level; /* ignore these levels */
10         char *mask; /* nick mask */
11         char *servertag; /* this is for autoignoring */
12         char **channels; /* ignore only in these channels */
13         char *pattern; /* text body must match this pattern */
14
15         time_t unignore_time; /* time in sec for temp ignores */
16
17         unsigned int exception:1; /* *don't* ignore */
18         unsigned int regexp:1;
19         unsigned int fullword:1;
20         unsigned int replies:1; /* ignore replies to nick in channel */
21 #ifdef HAVE_REGEX_H
22         unsigned int regexp_compiled:1; /* should always be TRUE, unless regexp is invalid */
23         regex_t preg;
24 #endif
25 } IGNORE_REC;
26
27 extern GSList *ignores;
28
29 int ignore_check(SERVER_REC *server, const char *nick, const char *host,
30                  const char *channel, const char *text, int level);
31
32 IGNORE_REC *ignore_find(const char *servertag, const char *mask, char **channels);
33
34 void ignore_add_rec(IGNORE_REC *rec);
35 void ignore_update_rec(IGNORE_REC *rec);
36
37 void ignore_init(void);
38 void ignore_deinit(void);
39
40 #endif