OpenPKG CVS Repository
  http://cvs.openpkg.org/
  ____________________________________________________________________________

  Server: cvs.openpkg.org                  Name:   Ralf S. Engelschall
  Root:   /v/openpkg/cvs                   Email:  [EMAIL PROTECTED]
  Module: openpkg-src                      Date:   13-Apr-2005 14:50:39
  Branch: HEAD                             Handle: 2005041313503900

  Modified files:
    openpkg-src/ratbox      ratbox-services.conf ratbox.patch

  Log:
    add a small feature we wish to have: allow clients to login only under
    the username which matches their nickname

  Summary:
    Revision    Changes     Path
    1.2         +1  -0      openpkg-src/ratbox/ratbox-services.conf
    1.2         +54 -2      openpkg-src/ratbox/ratbox.patch
  ____________________________________________________________________________

  patch -p0 <<'@@ .'
  Index: openpkg-src/ratbox/ratbox-services.conf
  ============================================================================
  $ cvs diff -u -r1.1 -r1.2 ratbox-services.conf
  --- openpkg-src/ratbox/ratbox-services.conf   13 Apr 2005 12:48:26 -0000      
1.1
  +++ openpkg-src/ratbox/ratbox-services.conf   13 Apr 2005 12:50:39 -0000      
1.2
  @@ -76,6 +76,7 @@
       expire_time                = 4 weeks;
       allow_set_password         = yes;
       max_logins                 = 2;
  +    login_nick_only            = no;
   };
   
   service "chanserv" {
  @@ .
  patch -p0 <<'@@ .'
  Index: openpkg-src/ratbox/ratbox.patch
  ============================================================================
  $ cvs diff -u -r1.1 -r1.2 ratbox.patch
  --- openpkg-src/ratbox/ratbox.patch   11 Apr 2005 19:54:41 -0000      1.1
  +++ openpkg-src/ratbox/ratbox.patch   13 Apr 2005 12:50:39 -0000      1.2
  @@ -1,6 +1,6 @@
   Index: ircd-ratbox-2.0.8/modules/Makefile.in
   --- ircd-ratbox-2.0.8/modules/Makefile.in.orig       2005-01-14 18:25:51 
+0100
  -+++ ircd-ratbox-2.0.8/modules/Makefile.in    2005-04-11 21:44:28 +0200
  ++++ ircd-ratbox-2.0.8/modules/Makefile.in    2005-04-13 13:58:04 +0200
   @@ -182,7 +182,7 @@
        ${CC} ${CPPFLAGS} ${CFLAGS} -DMODNAME=`basename $< .c`_mheader -c $< -o 
$@
    
  @@ -12,7 +12,7 @@
        $(LD) -b $< -o $@
   Index: ratbox-services-1.0beta1/src/Makefile.in
   --- ratbox-services-1.0beta1/src/Makefile.in.orig    2005-01-04 20:58:50 
+0100
  -+++ ratbox-services-1.0beta1/src/Makefile.in 2005-04-11 21:41:39 +0200
  ++++ ratbox-services-1.0beta1/src/Makefile.in 2005-04-13 13:58:04 +0200
   @@ -12,7 +12,7 @@
    INCLUDES=-I ../include/ @SQLITE_INCLUDES@
    [EMAIL PROTECTED]@
  @@ -22,3 +22,55 @@
    MAKE = make
    
    # Anything marked with the .PHONY attribute is always considered "out of 
date"
  +Index: ratbox-services-1.0beta1/include/conf.h
  +--- ratbox-services-1.0beta1/include/conf.h.orig     2005-02-14 18:40:12 
+0100
  ++++ ratbox-services-1.0beta1/include/conf.h  2005-04-13 14:12:26 +0200
  +@@ -47,6 +47,7 @@
  +     int allow_set_password;
  +     int allow_set_email;
  +     int umax_logins;
  ++    int login_nick_only;
  + 
  +     /* chanserv */
  +     int disable_cregister;
  +Index: ratbox-services-1.0beta1/src/conf.c
  +--- ratbox-services-1.0beta1/src/conf.c.orig 2005-02-14 18:40:14 +0100
  ++++ ratbox-services-1.0beta1/src/conf.c      2005-04-13 14:11:17 +0200
  +@@ -55,6 +55,7 @@
  +     config_file.allow_set_password = 1;
  +     config_file.allow_set_email = 1;
  +     config_file.umax_logins = 5;
  ++    config_file.login_nick_only = 0;
  + 
  +     config_file.disable_cregister = 0;
  +     config_file.cregister_time = 60;
  +Index: ratbox-services-1.0beta1/src/newconf.c
  +--- ratbox-services-1.0beta1/src/newconf.c.orig      2005-02-14 18:40:14 
+0100
  ++++ ratbox-services-1.0beta1/src/newconf.c   2005-04-13 14:11:38 +0200
  +@@ -849,6 +849,7 @@
  +     { "allow_set_password", CF_YESNO, NULL, 0, 
&config_file.allow_set_password      },
  +     { "allow_set_email",    CF_YESNO, NULL, 0, &config_file.allow_set_email 
        },
  +     { "max_logins",         CF_INT,   NULL, 0, &config_file.umax_logins     
        },
  ++    { "login_nick_only",    CF_YESNO, NULL, 0, &config_file.login_nick_only 
        },
  +     { "\0", 0, NULL, 0, NULL }
  + };
  + 
  +Index: ratbox-services-1.0beta1/src/s_userserv.c
  +--- ratbox-services-1.0beta1/src/s_userserv.c.orig   2005-02-16 01:26:48 
+0100
  ++++ ratbox-services-1.0beta1/src/s_userserv.c        2005-04-13 14:24:19 
+0200
  +@@ -686,6 +686,15 @@
  +             return 1;
  +     }
  + 
  ++    if(config_file.login_nick_only &&
  ++       strcmp(parv[0], client_p->name) != 0)
  ++    {
  ++            service_error(userserv_p, client_p,
  ++                    "Login failed, username %s does not match nickname %s",
  ++                    parv[0], client_p->name);
  ++            return 1;
  ++    }
  ++
  +     password = get_crypt(parv[1], reg_p->password);
  + 
  +     if(strcmp(password, reg_p->password))
  @@ .
______________________________________________________________________
The OpenPKG Project                                    www.openpkg.org
CVS Repository Commit List                     openpkg-cvs@openpkg.org

Reply via email to