From a3a098b0a4de0b95dbbc2c759c5ad79b94d93e7c Mon Sep 17 00:00:00 2001 From: Michael Poole Date: Fri, 2 Sep 2005 03:34:34 +0000 Subject: [PATCH] Remove bits of old and dead code from gline handling. git-svn-id: file:///home/klmitch/undernet-ircu/undernet-ircu-svn/ircu2/trunk@1476 c9e4aea6-c8fd-4c43-8297-357d70d61c8c --- ChangeLog | 7 +++++++ ircd/gline.c | 17 ++--------------- 2 files changed, 9 insertions(+), 15 deletions(-) diff --git a/ChangeLog b/ChangeLog index 0c29ede..a2ee113 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2005-09-01 Michael Poole + + * ircd/gline.c (make_gline): Remove debug output from when IPv6 + support was being debugged. + (do_gline): Likewise. + (gline_lookup): Likewise, plus remove redundant code. + 2005-09-01 Michael Poole * ircd/channel.c (joinbuf_join): Ignore joinbuf type when joining diff --git a/ircd/gline.c b/ircd/gline.c index 689e2fb..3bfaa89 100644 --- a/ircd/gline.c +++ b/ircd/gline.c @@ -161,10 +161,8 @@ make_gline(char *user, char *host, char *reason, time_t expire, time_t lastmod, else gline->gl_host = NULL; - if (*user != '$' && ipmask_parse(host, &gline->gl_addr, &gline->gl_bits)) { - Debug((DEBUG_DEBUG,"IP gline: %s/%u", ircd_ntoa(&gline->gl_addr), gline->gl_bits)); + if (*user != '$' && ipmask_parse(host, &gline->gl_addr, &gline->gl_bits)) gline->gl_flags |= GLINE_IPMASK; - } if (after) { gline->gl_next = after->gl_next; @@ -223,10 +221,6 @@ do_gline(struct Client *cptr, struct Client *sptr, struct Gline *gline) continue; if (GlineIsIpMask(gline)) { -#ifdef DEBUGMODE - char tbuf1[SOCKIPLEN], tbuf2[SOCKIPLEN]; - Debug((DEBUG_DEBUG,"IP gline: %s %s/%u", ircd_ntoa_r(tbuf1, &cli_ip(acptr)), ircd_ntoa_r(tbuf2, &gline->gl_addr), gline->gl_bits)); -#endif if (!ipmask_check(&cli_ip(acptr), &gline->gl_addr, gline->gl_bits)) continue; } @@ -693,7 +687,7 @@ gline_lookup(struct Client *cptr, unsigned int flags) gline_free(gline); continue; } - + if ((flags & GLINE_GLOBAL && gline->gl_flags & GLINE_LOCAL) || (flags & GLINE_LASTMOD && !gline->gl_lastmod)) continue; @@ -702,19 +696,12 @@ 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 { if (match(gline->gl_user, (cli_user(cptr))->username) != 0) continue; if (GlineIsIpMask(gline)) { -#ifdef DEBUGMODE - char tbuf1[SOCKIPLEN], tbuf2[SOCKIPLEN]; - Debug((DEBUG_DEBUG,"IP gline: %s %s/%u", ircd_ntoa_r(tbuf1, &cli_ip(cptr)), ircd_ntoa_r(tbuf2, &gline->gl_addr), gline->gl_bits)); -#endif if (!ipmask_check(&cli_ip(cptr), &gline->gl_addr, gline->gl_bits)) continue; } -- 2.20.1