summaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
authorLemonBoy <thatlemon@gmail.com>2016-01-03 21:19:46 +0100
committerLemonBoy <thatlemon@gmail.com>2016-01-03 21:26:57 +0100
commitdbee606c60c4d8d7c6e5cabd1241fc182ae6c4a3 (patch)
tree1c7339c5a1d2ea1a1e1cbb865ae37935fe31753e /src/core
parent609f3ba6c2db4f04e1e11304459d4fc42babd8ff (diff)
downloadirssi-dbee606c60c4d8d7c6e5cabd1241fc182ae6c4a3.zip
Don't break the API.
Have a ignore_find_full method that is the one that all the new code should be using and provide some working stubs for ignore_find and ignore_find_noact.
Diffstat (limited to 'src/core')
-rw-r--r--src/core/ignore.c12
-rw-r--r--src/core/ignore.h9
2 files changed, 18 insertions, 3 deletions
diff --git a/src/core/ignore.c b/src/core/ignore.c
index ee9e180d..8d5a27c2 100644
--- a/src/core/ignore.c
+++ b/src/core/ignore.c
@@ -186,7 +186,7 @@ int ignore_check(SERVER_REC *server, const char *nick, const char *host,
return ignore_check_replies(chanrec, text, level);
}
-IGNORE_REC *ignore_find(const char *servertag, const char *mask, const char *pattern,
+IGNORE_REC *ignore_find_full(const char *servertag, const char *mask, const char *pattern,
char **channels, const int flags)
{
GSList *tmp;
@@ -257,6 +257,16 @@ IGNORE_REC *ignore_find(const char *servertag, const char *mask, const char *pat
return NULL;
}
+IGNORE_REC *ignore_find(const char *servertag, const char *mask, char **channels)
+{
+ return ignore_find_full(servertag, mask, NULL, channels, 0);
+}
+
+IGNORE_REC *ignore_find_noact(const char *servertag, const char *mask, char **channels, int noact)
+{
+ return ignore_find_full(servertag, mask, NULL, channels, IGNORE_FIND_NOACT);
+}
+
static void ignore_set_config(IGNORE_REC *rec)
{
CONFIG_NODE *node;
diff --git a/src/core/ignore.h b/src/core/ignore.h
index 0901e795..f889740f 100644
--- a/src/core/ignore.h
+++ b/src/core/ignore.h
@@ -36,8 +36,13 @@ enum {
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);
+IGNORE_REC *ignore_find_full (const char *servertag, const char *mask, const char *pattern,
+ char **channels, const int flags);
+
+// Convenience wrappers around ignore_find_full, for compatibility purpose
+
+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);
void ignore_add_rec(IGNORE_REC *rec);
void ignore_update_rec(IGNORE_REC *rec);