Correctly match users against new IP-based G-lines.
[ircu2.10.12-pk.git] / ircd / gline.c
index 5994e3eab4b86986752a7d8dee57cbd9ed83d28f..92b5abe580b5a0e2df7e3d9437e4eca514f0101e 100644 (file)
@@ -225,9 +225,9 @@ do_gline(struct Client *cptr, struct Client *sptr, struct Gline *gline)
         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));
+          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(cptr), &gline->gl_addr, gline->gl_bits))
+          if (!ipmask_check(&cli_ip(acptr), &gline->gl_addr, gline->gl_bits))
             continue;
         }
         else {