ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/svn/ircd-hybrid/trunk/src/user.c
(Generate patch)

Comparing ircd-hybrid/trunk/src/user.c (file contents):
Revision 9897 by michael, Sat Jan 9 14:20:00 2021 UTC vs.
Revision 9898 by michael, Sun Jan 17 06:19:26 2021 UTC

# Line 540 | Line 540 | valid_username(const char *username, boo
540  
541    if (local)
542    {
543 <    unsigned int dots = 0;
543 >    unsigned int special = 0;
544  
545      while (*p)
546      {
547 <      if (*p == '.' && ConfigGeneral.dots_in_ident)
547 >      if (*p == '-' || *p == '_' || *p == '.')
548        {
549 <        if (++dots > ConfigGeneral.dots_in_ident)
550 <          return false;
551 <        if (!IsUser2Char(*(p + 1)))
549 >        if (ConfigGeneral.specials_in_ident &&
550 >            ConfigGeneral.specials_in_ident < ++special)
551            return false;
552        }
553        else if (!IsUser2Char(*p))
554          return false;
555 +
556 +      ++p;
557      }
558    }
559    else

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines