From 8d58dafabb1676cba14a4a2776690d8710de561e Mon Sep 17 00:00:00 2001 From: Michael Poole Date: Thu, 7 Apr 2005 00:25:47 +0000 Subject: [PATCH] Make Client block passwords work again (reported by Reed). git-svn-id: file:///home/klmitch/undernet-ircu/undernet-ircu-svn/ircu2/trunk@1355 c9e4aea6-c8fd-4c43-8297-357d70d61c8c --- ChangeLog | 7 +++++++ ircd/ircd_parser.y | 3 +++ ircd/s_user.c | 1 - 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 9150c0d..daafc2f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2005-04-06 Michael Poole + + * 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 * acinclude.m4 (unet_PIPE_CFLAGS): Remove; -pipe is obsolete in diff --git a/ircd/ircd_parser.y b/ircd/ircd_parser.y index a9876bf..fd4fac2 100644 --- a/ircd/ircd_parser.y +++ b/ircd/ircd_parser.y @@ -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; diff --git a/ircd/s_user.c b/ircd/s_user.c index 4a97b02..58e9ecf 100644 --- a/ircd/s_user.c +++ b/ircd/s_user.c @@ -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++; -- 2.20.1