2 # Parent d7905eb87f42cac8a0ca4281ec96e2a8c767ef4b
4 diff -r d7905eb87f42 ircd/s_auth.c
5 --- a/ircd/s_auth.c Sun Jul 14 23:14:33 2013 +0100
6 +++ b/ircd/s_auth.c Sun Jul 14 23:16:55 2013 +0100
13 + short character = 0;
18 - short digitgroups = 0;
27 + if (IsLower(ch) || IsUpper(ch))
31 - else if (IsUpper(ch))
34 - /* Accept caps as leading if we haven't seen lower case or digits yet. */
35 - if ((leadcaps || pos == 0) && !lower && !digits)
42 - if (pos == 0 || !IsDigit(last))
45 - /* If more than two groups of digits, reject. */
46 - if (digitgroups > 2)
50 else if (ch == '-' || ch == '_' || ch == '.')
56 - /* If mixed case, first must be capital, but no more than three;
57 - * but if three capitals, they must all be leading. */
58 - if (lower && upper && (!leadcaps || leadcaps > 3 ||
59 - (upper > 2 && upper > leadcaps)))
61 - /* If two different groups of digits, one must be either at the
63 - if (digitgroups == 2 && !(IsDigit(s[0]) || IsDigit(ch)))
65 /* Must have at least one letter. */
66 - if (!lower && !upper)
68 - /* Final character must not be punctuation. */