From cde740c02fca2f280277fd997b43857c5ddb9394 Mon Sep 17 00:00:00 2001 From: "drstein drstein@31f1291d-b8d6-0310-a050-a5561fc1590b" Date: Fri, 31 Aug 2007 18:38:14 +0000 Subject: 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 --- src/users.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src') 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; } } -- cgit