From f51ecc5090f86cf2c1b2127dc08c0fea0b058977 Mon Sep 17 00:00:00 2001 From: Michael Poole Date: Wed, 23 Jun 2004 03:13:38 +0000 Subject: [PATCH] forward port Alex Badea's gline patch from 2.10.11 git-svn-id: file:///home/klmitch/undernet-ircu/undernet-ircu-svn/ircu2/trunk@1080 c9e4aea6-c8fd-4c43-8297-357d70d61c8c --- ChangeLog | 8 ++++++++ ircd/gline.c | 5 ++++- ircd/s_conf.c | 4 +--- 3 files changed, 13 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 3ad5b62..ebfcee6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2004-06-18 Alex Badea + + * ircd/gline.c (gline_lookup): only return a gline if it's + active + + * ircd/s_conf.c (find_kill): don't check for active gline, + since gline_lookup does now + 2002-11-11 hikari * ircd/ircd.c: added call to irc_crypt_init() - someone hurry up and modularise :P diff --git a/ircd/gline.c b/ircd/gline.c index d865e17..2583e0d 100644 --- a/ircd/gline.c +++ b/ircd/gline.c @@ -656,7 +656,8 @@ gline_lookup(struct Client *cptr, unsigned int flags) Debug((DEBUG_DEBUG,"realname gline: '%s' '%s'",gline->gl_user,cli_info(cptr))); if (match(gline->gl_user+2, cli_info(cptr)) != 0) continue; - + if (!GlineIsActive(gline)) + continue; return gline; } else { @@ -671,6 +672,8 @@ gline_lookup(struct Client *cptr, unsigned int flags) else { if (match(gline->gl_host, (cli_user(cptr))->realhost) != 0) continue; + if (!GlineIsActive(gline)) + continue; } } return gline; diff --git a/ircd/s_conf.c b/ircd/s_conf.c index 714622f..63e5bfe 100644 --- a/ircd/s_conf.c +++ b/ircd/s_conf.c @@ -1211,15 +1211,13 @@ int find_kill(struct Client *cptr) send_reply(cptr, SND_EXPLICIT | ERR_YOUREBANNEDCREEP, ":%s.", deny->message); } } - else if ((agline = gline_lookup(cptr, 0)) && GlineIsActive(agline)) { + else if ((agline = gline_lookup(cptr, 0))) { /* * find active glines * added a check against the user's IP address to find_gline() -Kev */ send_reply(cptr, SND_EXPLICIT | ERR_YOUREBANNEDCREEP, ":%s.", GlineReason(agline)); } - else - agline = 0; /* if a gline was found, it was inactive */ if (deny) return -1; -- 2.20.1