irssi/src/core/ignore.h
Timo Sirainen 4a33801669 Added/moved several "typedef struct _XXX XXX;" to common.h so that
they're known to all files and I don't need those stupid "void *xxx"
anymore just to avoid useless #include. Header files themselves don't
either include others as often anymore.

Added channel->ownnick to point to our NICK_REC in channel's nicks.
Gives a minor speedup in few places :)

Moved completion specific lastmsgs from channel/server core records to
fe-common/core specific records. Also changed the nick completion logic
a bit so it should work better now. Removed
completion_keep_publics_count setting, but changed the meaning of
completion_keep_publics to same as _count was before. Nick completion
doesn't have any time specific code anymore.


git-svn-id: http://svn.irssi.org/repos/irssi/trunk@1034 dbcabf3a-b0e7-0310-adc4-f8d773084564
2001-01-01 07:45:54 +00:00

43 lines
1.1 KiB
C

#ifndef __IGNORE_H
#define __IGNORE_H
#ifdef HAVE_REGEX_H
# include <regex.h>
#endif
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 time; /* time in sec for temp ignores */
int time_tag;
unsigned int regexp:1;
unsigned int fullword:1;
unsigned int replies:1; /* ignore replies to nick in channel */
#ifdef HAVE_REGEX_H
unsigned int regexp_compiled:1; /* should always be TRUE, unless regexp is invalid */
regex_t preg;
#endif
} IGNORE_REC;
extern GSList *ignores;
int ignore_check(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