summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorailin-nemui <ailin-nemui@users.noreply.github.com>2015-11-23 10:05:05 +0100
committerailin-nemui <ailin-nemui@users.noreply.github.com>2015-11-23 10:05:05 +0100
commitf9654a7e0c0db48514e2b678a2f0ee4c61da39d9 (patch)
tree54c47f3a54e229d89a106f4fbc48838cce184080 /src
parent3ed21a530366c6ed13f3549d41219c690040053b (diff)
parent8701cbc972955ba7522390988e3c0e0c62770fa4 (diff)
downloadirssi-f9654a7e0c0db48514e2b678a2f0ee4c61da39d9.zip
Merge pull request #359 from LemonBoy/dcc-assert
Let ignore_check do its work when server is NULL
Diffstat (limited to 'src')
-rw-r--r--src/core/ignore.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/core/ignore.c b/src/core/ignore.c
index e70b741b..fd3c8a38 100644
--- a/src/core/ignore.c
+++ b/src/core/ignore.c
@@ -97,8 +97,8 @@ static int ignore_match_pattern(IGNORE_REC *rec, const char *text)
match_wildcards((rec)->mask, nick)))
#define ignore_match_server(rec, server) \
- ((rec)->servertag == NULL || \
- g_ascii_strcasecmp((server)->tag, (rec)->servertag) == 0)
+ ((rec)->servertag == NULL || ((server) != NULL && \
+ g_ascii_strcasecmp((server)->tag, (rec)->servertag) == 0))
#define ignore_match_channel(rec, channel) \
((rec)->channels == NULL || ((channel) != NULL && \
@@ -135,7 +135,6 @@ int ignore_check(SERVER_REC *server, const char *nick, const char *host,
char *nickmask;
int len, best_mask, best_match, best_patt;
- g_return_val_if_fail(server != NULL, 0);
if (nick == NULL) nick = "";
chanrec = server == NULL || channel == NULL ? NULL :