CVSROOT    : /cvsroot/undernet-ircu
Module     : ircu2.10
Branch tags: u2_10_11_06
Commit time: 2003-11-22 15:08:07 UTC

Modified files:
  Tag: u2_10_11_06
     ChangeLog ircd/gline.c

Log message:

Author: Kev <[EMAIL PROTECTED]>
Log message:

Little bit of logic cleanup here--let's see if this helps any...

---------------------- diff included ----------------------
Index: ircu2.10/ChangeLog
diff -u ircu2.10/ChangeLog:1.290.2.129.2.23 ircu2.10/ChangeLog:1.290.2.129.2.24
--- ircu2.10/ChangeLog:1.290.2.129.2.23 Sat Nov 22 05:55:05 2003
+++ ircu2.10/ChangeLog  Sat Nov 22 07:07:56 2003
@@ -1,3 +1,7 @@
+2003-11-22  Kevin L Mitchell  <[EMAIL PROTECTED]>
+
+       * ircd/gline.c (make_gline): little bit of logic cleanup here...
+
 2003-11-23 Beware <[EMAIL PROTECTED]>
        * doc/p10.txt: Bewares excellent reference on the p10 protocol as
        implemented by Undernet.
Index: ircu2.10/ircd/gline.c
diff -u ircu2.10/ircd/gline.c:1.38.2.8.2.9 ircu2.10/ircd/gline.c:1.38.2.8.2.10
--- ircu2.10/ircd/gline.c:1.38.2.8.2.9  Sat Nov 22 05:28:49 2003
+++ ircu2.10/ircd/gline.c       Sat Nov 22 07:07:57 2003
@@ -17,7 +17,7 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: gline.c,v 1.38.2.8.2.9 2003/11/22 13:28:49 isomer Exp $
+ * $Id: gline.c,v 1.38.2.8.2.10 2003/11/22 15:07:57 klmitch Exp $
  */
 #include "config.h"
 
@@ -96,19 +96,16 @@
 
       if (gline->gl_expire <= CurrentTime)
        gline_free(gline);
-      else if ((gline->gl_flags & GLINE_LOCAL) != (flags & GLINE_LOCAL))
+      else if (((gline->gl_flags & GLINE_LOCAL) != (flags & GLINE_LOCAL)) ||
+              (gline->gl_host && !host) || (!gline->gl_host && host))
        continue;
-      else if ( /* Both have gl_host set, or unset */
-               !((NULL == gline->gl_host) ^ (NULL==host))
-               && !mmatch(gline->gl_user, user) /* gline contains new mask */
-               && (gline->gl_host == NULL || !mmatch(gline->gl_host, host))) {
+      else if (!mmatch(gline->gl_user, user) /* gline contains new mask */
+              && (gline->gl_host == NULL || !mmatch(gline->gl_host, host))) {
        if (expire <= gline->gl_expire) /* will expire before wider gline */
          return 0;
        else
          after = gline; /* stick new gline after this one */
-      } else if (
-                !((NULL == gline->gl_host) ^ (NULL==host))
-                && !mmatch(user, gline->gl_user) /* new mask contains gline */
+      } else if (!mmatch(user, gline->gl_user) /* new mask contains gline */
                 && (gline->gl_host==NULL || !mmatch(host, gline->gl_host)) 
                 && gline->gl_expire <= expire) /* old expires before new */
        gline_free(gline); /* save some memory */
----------------------- End of diff -----------------------

Reply via email to