67 |
|
static void user_welcome(struct Client *); |
68 |
|
static void report_and_set_user_flags(struct Client *, const struct AccessItem *); |
69 |
|
static int check_xline(struct Client *); |
70 |
– |
static int check_regexp_xline(struct Client *); |
70 |
|
static void introduce_client(struct Client *, struct Client *); |
71 |
|
static void *uid_get(va_list); |
72 |
|
|
295 |
|
assert(source_p->username != username); |
296 |
|
assert(!source_p->localClient->registration); |
297 |
|
|
298 |
+ |
ClearCap(client_p, CAP_TS6); |
299 |
+ |
|
300 |
|
if (ConfigFileEntry.ping_cookie) |
301 |
|
{ |
302 |
|
if (!IsPingSent(source_p) && |
417 |
|
|
418 |
|
assert(source_p == client_p); |
419 |
|
|
420 |
< |
/* end of valid user name check */ |
420 |
< |
if (check_xline(source_p) || check_regexp_xline(source_p)) |
420 |
> |
if (check_xline(source_p)) |
421 |
|
return; |
422 |
|
|
423 |
|
if (IsDead(client_p)) |
859 |
|
static void * |
860 |
|
change_simple_umode(va_list args) |
861 |
|
{ |
862 |
+ |
struct Client *client_p; |
863 |
|
struct Client *source_p; |
864 |
|
int what; |
865 |
|
unsigned int flag; |
866 |
|
|
867 |
< |
va_arg(args, struct Client *); |
867 |
> |
client_p = va_arg(args, struct Client *); |
868 |
|
source_p = va_arg(args, struct Client *); |
869 |
|
what = va_arg(args, int); |
870 |
|
flag = va_arg(args, unsigned int); |
1209 |
|
static int |
1210 |
|
check_xline(struct Client *source_p) |
1211 |
|
{ |
1212 |
< |
struct ConfItem *conf; |
1213 |
< |
struct MatchItem *xconf; |
1213 |
< |
const char *reason; |
1212 |
> |
struct ConfItem *conf = NULL; |
1213 |
> |
const char *reason = NULL; |
1214 |
|
|
1215 |
< |
if ((conf = find_matching_name_conf(XLINE_TYPE, source_p->info, |
1216 |
< |
NULL, NULL, 0)) != NULL) |
1215 |
> |
if ((conf = find_matching_name_conf(XLINE_TYPE, source_p->info, NULL, NULL, 0)) || |
1216 |
> |
(conf = find_matching_name_conf(RXLINE_TYPE, source_p->info, NULL, NULL, 0))) |
1217 |
|
{ |
1218 |
< |
xconf = map_to_conf(conf); |
1219 |
< |
xconf->count++; |
1218 |
> |
struct MatchItem *reg = map_to_conf(conf); |
1219 |
|
|
1220 |
< |
if (xconf->reason != NULL) |
1221 |
< |
reason = xconf->reason; |
1220 |
> |
++reg->count; |
1221 |
> |
|
1222 |
> |
if (reg->reason != NULL) |
1223 |
> |
reason = reg->reason; |
1224 |
|
else |
1225 |
|
reason = "No Reason"; |
1226 |
|
|
1230 |
|
get_client_name(source_p, HIDE_IP), |
1231 |
|
source_p->sockhost); |
1232 |
|
|
1233 |
< |
ServerStats->is_ref++; |
1233 |
> |
ServerStats->is_ref++; |
1234 |
|
if (REJECT_HOLD_TIME > 0) |
1235 |
|
{ |
1236 |
|
sendto_one(source_p, ":%s NOTICE %s :Bad user info", |
1246 |
|
return 0; |
1247 |
|
} |
1248 |
|
|
1248 |
– |
static int |
1249 |
– |
check_regexp_xline(struct Client *source_p) |
1250 |
– |
{ |
1251 |
– |
struct ConfItem *conf = NULL; |
1252 |
– |
const char *reason = NULL; |
1253 |
– |
|
1254 |
– |
if ((conf = find_matching_name_conf(RXLINE_TYPE, source_p->info, NULL, NULL, 0))) |
1255 |
– |
{ |
1256 |
– |
struct MatchItem *reg = map_to_conf(conf); |
1257 |
– |
|
1258 |
– |
++reg->count; |
1259 |
– |
|
1260 |
– |
if (reg->reason != NULL) |
1261 |
– |
reason = reg->reason; |
1262 |
– |
else |
1263 |
– |
reason = "No Reason"; |
1264 |
– |
|
1265 |
– |
sendto_realops_flags(UMODE_REJ, L_ALL, |
1266 |
– |
"X-line (REGEX) Rejecting [%s] [%s], user %s [%s]", |
1267 |
– |
source_p->info, reason, |
1268 |
– |
get_client_name(source_p, HIDE_IP), |
1269 |
– |
source_p->sockhost); |
1270 |
– |
|
1271 |
– |
ServerStats->is_ref++; |
1272 |
– |
exit_client(source_p, &me, "Bad user info"); |
1273 |
– |
return 1; |
1274 |
– |
} |
1275 |
– |
|
1276 |
– |
return 0; |
1277 |
– |
} |
1278 |
– |
|
1249 |
|
/* oper_up() |
1250 |
|
* |
1251 |
|
* inputs - pointer to given client to oper |
1304 |
|
|
1305 |
|
if (strlen(sid) == IRC_MAXSID) |
1306 |
|
if (IsDigit(*sid)) |
1307 |
< |
if (IsUpper(*(sid + 1)) && IsUpper(*(sid + 2))) |
1307 |
> |
if (IsAlNum(*(sid + 1)) && IsAlNum(*(sid + 2))) |
1308 |
|
return 1; |
1309 |
|
|
1310 |
|
return 0; |
1411 |
|
|
1412 |
|
add_isupport("CALLERID", NULL, -1); |
1413 |
|
add_isupport("CASEMAPPING", CASEMAP, -1); |
1414 |
+ |
add_isupport("DEAF", "D", -1); |
1415 |
|
add_isupport("KICKLEN", NULL, KICKLEN); |
1416 |
|
add_isupport("MODES", NULL, MAXMODEPARAMS); |
1417 |
|
add_isupport("NICKLEN", NULL, NICKLEN-1); |