summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorviper viper@31f1291d-b8d6-0310-a050-a5561fc1590b <viper viper@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864>2008-09-09 00:39:38 +0000
committerviper viper@31f1291d-b8d6-0310-a050-a5561fc1590b <viper viper@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864>2008-09-09 00:39:38 +0000
commit66a68d639f33f8394d61d246f8b7c8dd76192c30 (patch)
tree8be4fccd1169206ae2a8abec766724ee50941080 /src
parentdeb6fde2ed3912fccf8107bf721e78ac6c07fc98 (diff)
BUILD : 1.7.21 (1431) BUGS : NOTES : Fixes possible mismatches in entry_match() introduced in previous commit.
git-svn-id: svn://svn.anope.org/anope/trunk@1431 31f1291d-b8d6-0310-a050-a5561fc1590b git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@1146 5417fbe8-f217-4b02-8779-1006273d7864
Diffstat (limited to 'src')
-rw-r--r--src/channels.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/channels.c b/src/channels.c
index 6720f4d71..8f1df877d 100644
--- a/src/channels.c
+++ b/src/channels.c
@@ -2095,17 +2095,17 @@ int entry_match(Entry *e, char *nick, char *user, char *host, uint32 ip)
if (ircd->cidrchanbei && (e->type & ENTRYTYPE_CIDR4) &&
(!ip || (ip && ((ip & e->cidr_mask) != e->cidr_ip))))
return 0;
- if (nick && (e->type & ENTRYTYPE_NICK) && (stricmp(e->nick, nick) != 0))
+ if ((e->type & ENTRYTYPE_NICK) && (!nick || stricmp(e->nick, nick) != 0))
return 0;
- if (user && (e->type & ENTRYTYPE_USER) && (stricmp(e->user, user) != 0))
+ if ((e->type & ENTRYTYPE_USER) && (!user || stricmp(e->user, user) != 0))
return 0;
- if (host && (e->type & ENTRYTYPE_HOST) && (stricmp(e->host, host) != 0))
+ if ((e->type & ENTRYTYPE_HOST) && (!user || stricmp(e->host, host) != 0))
return 0;
- if (nick && (e->type & ENTRYTYPE_NICK_WILD) && !match_wild_nocase(e->nick, nick))
+ if ((e->type & ENTRYTYPE_NICK_WILD) && !match_wild_nocase(e->nick, nick))
return 0;
- if (user && (e->type & ENTRYTYPE_USER_WILD) && !match_wild_nocase(e->user, user))
+ if ((e->type & ENTRYTYPE_USER_WILD) && !match_wild_nocase(e->user, user))
return 0;
- if (host && (e->type & ENTRYTYPE_HOST_WILD) && !match_wild_nocase(e->host, host))
+ if ((e->type & ENTRYTYPE_HOST_WILD) && !match_wild_nocase(e->host, host))
return 0;
return 1;