Remove bits of old and dead code from gline handling.
authorMichael Poole <mdpoole@troilus.org>
Fri, 2 Sep 2005 03:34:34 +0000 (03:34 +0000)
committerMichael Poole <mdpoole@troilus.org>
Fri, 2 Sep 2005 03:34:34 +0000 (03:34 +0000)
git-svn-id: file:///home/klmitch/undernet-ircu/undernet-ircu-svn/ircu2/trunk@1476 c9e4aea6-c8fd-4c43-8297-357d70d61c8c

ChangeLog
ircd/gline.c

index 0c29edef4198845f3d8452cddde92317f21f99b9..a2ee1133b6de847281a04a18904003c339671f17 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2005-09-01  Michael Poole <mdpoole@troilus.org>
+
+       * 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 <mdpoole@troilus.org>
 
        * ircd/channel.c (joinbuf_join): Ignore joinbuf type when joining
index 689e2fb5e63a642e31cb83742419be6a5f86fef4..3bfaa89c706bb7687cb10f1bbc50c1b480b94e09 100644 (file)
@@ -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;
       }