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

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

Log message:

Author: Isomer <[EMAIL PROTECTED]> / beware <[EMAIL PROTECTED]>
Log message:

* Fixed missing negation

* Only allocate a numeric nick on successful connection

---------------------- diff included ----------------------
Index: ircu2.10/ChangeLog
diff -u ircu2.10/ChangeLog:1.290.2.129.2.13 ircu2.10/ChangeLog:1.290.2.129.2.14
--- ircu2.10/ChangeLog:1.290.2.129.2.13 Thu Nov  6 16:37:31 2003
+++ ircu2.10/ChangeLog  Mon Nov 10 00:14:18 2003
@@ -1,3 +1,7 @@
+2003-11-09 beware <[EMAIL PROTECTED]>
+        * move assigning a numeric to a local client from when nick is set,
+       to when connection becomes client, to not waste numerics.
+
 2003-11-06 Isomer <[EMAIL PROTECTED]>
        * include/gline.c: a^b vs !(a^b)
 
Index: ircu2.10/ircd/gline.c
diff -u ircu2.10/ircd/gline.c:1.38.2.8.2.6 ircu2.10/ircd/gline.c:1.38.2.8.2.7
--- ircu2.10/ircd/gline.c:1.38.2.8.2.6  Thu Nov  6 16:37:32 2003
+++ ircu2.10/ircd/gline.c       Mon Nov 10 00:14:19 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.6 2003/11/07 00:37:32 isomer Exp $
+ * $Id: gline.c,v 1.38.2.8.2.7 2003/11/10 08:14:19 isomer Exp $
  */
 #include "config.h"
 
@@ -106,9 +106,11 @@
          return 0;
        else
          after = gline; /* stick new gline after this one */
-      } else if (!mmatch(user, gline->gl_user) && /* new mask contains gline */
-                (gline->gl_host || !mmatch(host, gline->gl_host)) &&
-                gline->gl_expire <= expire) /* gline expires before new one */
+      } else if (
+                !((NULL == gline->gl_host) ^ (NULL==host))
+                && !mmatch(user, gline->gl_user) /* new mask contains gline */
+                && (gline->gl_host || !mmatch(host, gline->gl_host)) 
+                && gline->gl_expire <= expire) /* old expires before new */
        gline_free(gline); /* save some memory */
     }
   }
Index: ircu2.10/ircd/s_user.c
diff -u ircu2.10/ircd/s_user.c:1.52.2.16.2.3 ircu2.10/ircd/s_user.c:1.52.2.16.2.4
--- ircu2.10/ircd/s_user.c:1.52.2.16.2.3        Thu Nov  6 02:58:45 2003
+++ ircu2.10/ircd/s_user.c      Mon Nov 10 00:14:19 2003
@@ -20,7 +20,7 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: s_user.c,v 1.52.2.16.2.3 2003/11/06 10:58:45 isomer Exp $
+ * $Id: s_user.c,v 1.52.2.16.2.4 2003/11/10 08:14:19 isomer Exp $
  */
 #include "config.h"
 
@@ -542,6 +542,8 @@
     cli_handler(sptr) = CLIENT_HANDLER;
     release_dns_reply(sptr);
 
+    SetLocalNumNick(sptr);
+    
     send_reply(
        sptr, 
        RPL_WELCOME, 
@@ -789,7 +791,6 @@
       cli_user(sptr) = make_user(sptr);
       cli_user(sptr)->server = &me;
     }
-    SetLocalNumNick(sptr);
     hAddClient(sptr);
 
     /*
----------------------- End of diff -----------------------

Reply via email to