diff options
author | drstein drstein@31f1291d-b8d6-0310-a050-a5561fc1590b <drstein drstein@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864> | 2007-08-31 18:38:14 +0000 |
---|---|---|
committer | drstein drstein@31f1291d-b8d6-0310-a050-a5561fc1590b <drstein drstein@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864> | 2007-08-31 18:38:14 +0000 |
commit | cde740c02fca2f280277fd997b43857c5ddb9394 (patch) | |
tree | 5621c60d52455b33770d02e61e7b3fac786d2ae6 /src | |
parent | 6e4767644e5cef9ecbfaadfcc1860002072c38c5 (diff) |
BUILD : 1.7.19 (1293) BUGS : 778 NOTES : is_excepted() now uses match_userip() also.
git-svn-id: svn://svn.anope.org/anope/trunk@1293 31f1291d-b8d6-0310-a050-a5561fc1590b
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@1011 5417fbe8-f217-4b02-8779-1006273d7864
Diffstat (limited to 'src')
-rw-r--r-- | src/users.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/users.c b/src/users.c index c6fb4c1cf..f5c0c4160 100644 --- a/src/users.c +++ b/src/users.c @@ -915,6 +915,7 @@ int is_excepted(ChannelInfo * ci, User * user) int count, i; int isexcepted = 0; char **excepts; + char *hostip = NULL; if (!ci->c) return 0; @@ -927,8 +928,11 @@ int is_excepted(ChannelInfo * ci, User * user) excepts = scalloc(sizeof(char *) * count, 1); memcpy(excepts, ci->c->excepts, sizeof(char *) * count); + hostip = host_resolve(user->host); + for (i = 0; i < count; i++) { - if (match_usermask(excepts[i], user)) { + if (match_usermask(excepts[i], user) + || (hostip && match_userip(excepts[i], user, hostip))) { isexcepted = 1; } } |