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 |
|
|
417 |
|
|
418 |
|
assert(source_p == client_p); |
419 |
|
|
420 |
< |
/* end of valid user name check */ |
422 |
< |
if (check_xline(source_p) || check_regexp_xline(source_p)) |
420 |
> |
if (check_xline(source_p)) |
421 |
|
return; |
422 |
|
|
423 |
|
if (IsDead(client_p)) |
1208 |
|
static int |
1209 |
|
check_xline(struct Client *source_p) |
1210 |
|
{ |
1211 |
< |
struct ConfItem *conf; |
1212 |
< |
struct MatchItem *xconf; |
1215 |
< |
const char *reason; |
1211 |
> |
struct ConfItem *conf = NULL; |
1212 |
> |
const char *reason = NULL; |
1213 |
|
|
1214 |
< |
if ((conf = find_matching_name_conf(XLINE_TYPE, source_p->info, |
1215 |
< |
NULL, NULL, 0)) != NULL) |
1214 |
> |
if ((conf = find_matching_name_conf(XLINE_TYPE, source_p->info, NULL, NULL, 0)) || |
1215 |
> |
(conf = find_matching_name_conf(RXLINE_TYPE, source_p->info, NULL, NULL, 0))) |
1216 |
|
{ |
1217 |
< |
xconf = map_to_conf(conf); |
1218 |
< |
xconf->count++; |
1217 |
> |
struct MatchItem *reg = map_to_conf(conf); |
1218 |
> |
|
1219 |
> |
++reg->count; |
1220 |
|
|
1221 |
< |
if (xconf->reason != NULL) |
1222 |
< |
reason = xconf->reason; |
1221 |
> |
if (reg->reason != NULL) |
1222 |
> |
reason = reg->reason; |
1223 |
|
else |
1224 |
|
reason = "No Reason"; |
1225 |
|
|
1229 |
|
get_client_name(source_p, HIDE_IP), |
1230 |
|
source_p->sockhost); |
1231 |
|
|
1232 |
< |
ServerStats->is_ref++; |
1232 |
> |
ServerStats->is_ref++; |
1233 |
|
if (REJECT_HOLD_TIME > 0) |
1234 |
|
{ |
1235 |
|
sendto_one(source_p, ":%s NOTICE %s :Bad user info", |
1242 |
|
return 1; |
1243 |
|
} |
1244 |
|
|
1247 |
– |
return 0; |
1248 |
– |
} |
1249 |
– |
|
1250 |
– |
static int |
1251 |
– |
check_regexp_xline(struct Client *source_p) |
1252 |
– |
{ |
1253 |
– |
struct ConfItem *conf = NULL; |
1254 |
– |
const char *reason = NULL; |
1255 |
– |
|
1256 |
– |
if ((conf = find_matching_name_conf(RXLINE_TYPE, source_p->info, NULL, NULL, 0))) |
1257 |
– |
{ |
1258 |
– |
struct MatchItem *reg = map_to_conf(conf); |
1259 |
– |
|
1260 |
– |
++reg->count; |
1261 |
– |
|
1262 |
– |
if (reg->reason != NULL) |
1263 |
– |
reason = reg->reason; |
1264 |
– |
else |
1265 |
– |
reason = "No Reason"; |
1266 |
– |
|
1267 |
– |
sendto_realops_flags(UMODE_REJ, L_ALL, |
1268 |
– |
"X-line (REGEX) Rejecting [%s] [%s], user %s [%s]", |
1269 |
– |
source_p->info, reason, |
1270 |
– |
get_client_name(source_p, HIDE_IP), |
1271 |
– |
source_p->sockhost); |
1272 |
– |
|
1273 |
– |
ServerStats->is_ref++; |
1274 |
– |
exit_client(source_p, &me, "Bad user info"); |
1275 |
– |
return 1; |
1276 |
– |
} |
1277 |
– |
|
1245 |
|
return 0; |
1246 |
|
} |
1247 |
|
|