Author: net <simms@LUCIDA.QC.CA>
[ircu2.10.12-pk.git] / ircd / gline.c
index bc18f39ce2c49eb9671364535e1122bab176f4f7..3de628d19ad5d13a975ef3e1ce6d61b36494ea28 100644 (file)
@@ -168,16 +168,16 @@ do_gline(struct Client *cptr, struct Client *sptr, struct Gline *gline)
        continue;
        
       if (acptr->user->username && 
-          match(gline->gl_user, acptr->user->username) == 0)
-          continue;
+          match (gline->gl_user, acptr->user->username) != 0)
+               continue;
           
       if (GlineIsIpMask(gline)) {
         Debug((DEBUG_DEBUG,"IP gline: %08x %08x/%i",cptr->ip.s_addr,gline->ipnum.s_addr,gline->bits));
-        if ((cptr->ip.s_addr & NETMASK(gline->bits)) != gline->ipnum.s_addr)
+        if ((acptr->ip.s_addr & NETMASK(gline->bits)) != gline->ipnum.s_addr)
           continue;
       }
       else {
-        if (match(gline->gl_host, acptr->sock_ip) != 0)
+        if (match(gline->gl_host, acptr->sockhost) != 0)
           continue;
       }