diff options
author | LemonBoy <thatlemon@gmail.com> | 2016-01-03 19:49:18 +0100 |
---|---|---|
committer | LemonBoy <thatlemon@gmail.com> | 2016-01-03 19:49:18 +0100 |
commit | 609f3ba6c2db4f04e1e11304459d4fc42babd8ff (patch) | |
tree | 4f443608facdee13362785646d0f48d4b3a908d4 /src/core/ignore.h | |
parent | 787956af3aac001755ec87d52cbb28f7c91800e1 (diff) | |
download | irssi-609f3ba6c2db4f04e1e11304459d4fc42babd8ff.zip |
Clean up the ignore_find API to make it more powerful.
This way we prevent the creation of duplicate ignores since the old code
skipped the ignore_find call when a pattern was specified.
It should also cover all the cases where the ignores would be wrongly
overwritten, such as the case outlined in #78.
Diffstat (limited to 'src/core/ignore.h')
-rw-r--r-- | src/core/ignore.h | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/core/ignore.h b/src/core/ignore.h index 46025d4c..0901e795 100644 --- a/src/core/ignore.h +++ b/src/core/ignore.h @@ -31,8 +31,13 @@ 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); -IGNORE_REC *ignore_find_noact(const char *servertag, const char *mask, char **channels, int noact); +enum { + IGNORE_FIND_PATTERN = 0x01, // Match the pattern + IGNORE_FIND_NOACT = 0x02, // Exclude the targets with NOACT level +}; + +IGNORE_REC *ignore_find(const char *servertag, const char *mask, const char *pattern, + char **channels, const int flags); void ignore_add_rec(IGNORE_REC *rec); void ignore_update_rec(IGNORE_REC *rec); |