Make Client block passwords work again (reported by Reed).
authorMichael Poole <mdpoole@troilus.org>
Thu, 7 Apr 2005 00:25:47 +0000 (00:25 +0000)
committerMichael Poole <mdpoole@troilus.org>
Thu, 7 Apr 2005 00:25:47 +0000 (00:25 +0000)
git-svn-id: file:///home/klmitch/undernet-ircu/undernet-ircu-svn/ircu2/trunk@1355 c9e4aea6-c8fd-4c43-8297-357d70d61c8c

ChangeLog
ircd/ircd_parser.y
ircd/s_user.c

index 9150c0d5176738e921b71e25ed283ca270e40cf5..daafc2fcc3326ce089e78a1a35edb440e03af4d8 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2005-04-06  Michael Poole <mdpoole@troilus.org>
+
+       * ircd/ircd_parser.y (clientblock): Use the password field.
+
+       * ircd/s_user.c (register_user): Allow aconf->password to be a
+       single digit, since per-IP limit is now in a separate field.
+
 2005-04-06  Michael Poole <mdpoole@troilus.org>
 
        * acinclude.m4 (unet_PIPE_CFLAGS): Remove; -pipe is obsolete in
index a9876bf15e1235ff2dd851eb0b7e94be2b0785c7..fd4fac2c555637ec4611cc9408802c831b727cb8 100644 (file)
@@ -659,6 +659,7 @@ clientblock: CLIENT
     MyFree(username);
     MyFree(host);
     MyFree(ip);
+    MyFree(pass);
   } else {
     struct ConfItem *aconf = make_conf(CONF_CLIENT);
     aconf->username = username;
@@ -671,11 +672,13 @@ clientblock: CLIENT
     aconf->name = ip;
     aconf->conn_class = c_class ? c_class : find_class("default");
     aconf->maximum = maxlinks;
+    aconf->passwd = pass;
   }
   host = NULL;
   username = NULL;
   c_class = NULL;
   ip = NULL;
+  pass = NULL;
 };
 clientitems: clientitem clientitems | clientitem;
 clientitem: clienthost | clientip | clientusername | clientclass | clientpass | clientmaxlinks | error;
index 4a97b0248d13dd8ba0174fb9559a2769c320ef4c..58e9ecf1246dc9e2453070d50a16e350c15f81bf 100644 (file)
@@ -469,7 +469,6 @@ int register_user(struct Client *cptr, struct Client *sptr,
       return exit_client(cptr, sptr, &me, "USER: Bogus userid.");
 
     if (!EmptyString(aconf->passwd)
-        && !(IsDigit(*aconf->passwd) && !aconf->passwd[1])
         && strcmp(cli_passwd(sptr), aconf->passwd))
     {
       ServerStats->is_ref++;