summaryrefslogtreecommitdiff
path: root/src/irc/core/ignore.h
blob: 17e591d4b75e935462d71e29be6cc5ac1776a1d6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#ifndef __IGNORE_H
#define __IGNORE_H

typedef struct {
	char *mask; /* nick mask */
        char *servertag; /* this is for autoignoring */
	char **channels; /* ignore only in these channels */
	char *pattern; /* text body must match this pattern */

	int level; /* ignore these levels */
	int except_level; /* don't ignore these levels */

	int regexp:1;
	int fullword:1;
} IGNORE_REC;

extern GSList *ignores;

int ignore_check(IRC_SERVER_REC *server, const char *nick, const char *host,
		 const char *channel, const char *text, int level);

IGNORE_REC *ignore_find(const char *servertag, const char *mask, char **channels);

void ignore_add_rec(IGNORE_REC *rec);
void ignore_update_rec(IGNORE_REC *rec);

void ignore_init(void);
void ignore_deinit(void);

#endif