| 76 |
|
|
| 77 |
|
static void check_pings_list(dlink_list *); |
| 78 |
|
static void check_unknowns_list(void); |
| 79 |
– |
static void ban_them(struct Client *, struct MaskItem *); |
| 79 |
|
|
| 80 |
|
|
| 81 |
|
/* client_init() |
| 357 |
|
if (conf->type == CONF_EXEMPT) |
| 358 |
|
continue; |
| 359 |
|
|
| 360 |
< |
ban_them(client_p, conf); |
| 360 |
> |
conf_try_ban(client_p, conf); |
| 361 |
|
continue; /* and go examine next fd/client_p */ |
| 362 |
|
} |
| 363 |
|
|
| 367 |
|
CONF_GLINE, client_p->localClient->aftype, |
| 368 |
|
client_p->username, NULL, 1))) |
| 369 |
|
{ |
| 370 |
< |
if (IsExemptKline(client_p) || |
| 372 |
< |
IsExemptGline(client_p)) |
| 373 |
< |
{ |
| 374 |
< |
sendto_realops_flags(UMODE_ALL, L_ALL, SEND_NOTICE, |
| 375 |
< |
"GLINE over-ruled for %s, client is %sline_exempt", |
| 376 |
< |
get_client_name(client_p, HIDE_IP), IsExemptKline(client_p) ? "k" : "g"); |
| 377 |
< |
continue; |
| 378 |
< |
} |
| 379 |
< |
|
| 380 |
< |
ban_them(client_p, conf); |
| 370 |
> |
conf_try_ban(client_p, conf); |
| 371 |
|
/* and go examine next fd/client_p */ |
| 372 |
|
continue; |
| 373 |
|
} |
| 377 |
|
CONF_KLINE, client_p->localClient->aftype, |
| 378 |
|
client_p->username, NULL, 1))) |
| 379 |
|
{ |
| 380 |
< |
if (IsExemptKline(client_p)) |
| 391 |
< |
{ |
| 392 |
< |
sendto_realops_flags(UMODE_ALL, L_ALL, SEND_NOTICE, |
| 393 |
< |
"KLINE over-ruled for %s, client is kline_exempt", |
| 394 |
< |
get_client_name(client_p, HIDE_IP)); |
| 395 |
< |
continue; |
| 396 |
< |
} |
| 397 |
< |
|
| 398 |
< |
ban_them(client_p, conf); |
| 380 |
> |
conf_try_ban(client_p, conf); |
| 381 |
|
continue; |
| 382 |
|
} |
| 383 |
|
|
| 384 |
|
if ((conf = find_matching_name_conf(CONF_XLINE, client_p->info, |
| 385 |
|
NULL, NULL, 0))) |
| 386 |
|
{ |
| 387 |
< |
ban_them(client_p, conf); |
| 387 |
> |
conf_try_ban(client_p, conf); |
| 388 |
|
continue; |
| 389 |
|
} |
| 390 |
|
} |
| 406 |
|
} |
| 407 |
|
|
| 408 |
|
/* |
| 409 |
< |
* ban_them |
| 409 |
> |
* conf_try_ban |
| 410 |
|
* |
| 411 |
|
* inputs - pointer to client to ban |
| 412 |
|
* - pointer to MaskItem |
| 413 |
|
* output - NONE |
| 414 |
|
* side effects - given client_p is banned |
| 415 |
|
*/ |
| 416 |
< |
static void |
| 417 |
< |
ban_them(struct Client *client_p, struct MaskItem *conf) |
| 416 |
> |
void |
| 417 |
> |
conf_try_ban(struct Client *client_p, struct MaskItem *conf) |
| 418 |
|
{ |
| 419 |
|
const char *user_reason = NULL; /* What is sent to user */ |
| 420 |
|
const char *type_string = NULL; |
| 426 |
|
switch (conf->type) |
| 427 |
|
{ |
| 428 |
|
case CONF_KLINE: |
| 429 |
+ |
if (IsExemptKline(client_p)) |
| 430 |
+ |
{ |
| 431 |
+ |
sendto_realops_flags(UMODE_ALL, L_ALL, SEND_NOTICE, |
| 432 |
+ |
"KLINE over-ruled for %s, client is kline_exempt", |
| 433 |
+ |
get_client_name(client_p, HIDE_IP)); |
| 434 |
+ |
return; |
| 435 |
+ |
} |
| 436 |
+ |
|
| 437 |
|
type_string = kline_string; |
| 438 |
|
break; |
| 439 |
|
case CONF_DLINE: |
| 440 |
|
type_string = dline_string; |
| 441 |
|
break; |
| 442 |
|
case CONF_GLINE: |
| 443 |
+ |
if (IsExemptKline(client_p) || |
| 444 |
+ |
IsExemptGline(client_p)) |
| 445 |
+ |
{ |
| 446 |
+ |
sendto_realops_flags(UMODE_ALL, L_ALL, SEND_NOTICE, |
| 447 |
+ |
"GLINE over-ruled for %s, client is %sline_exempt", |
| 448 |
+ |
get_client_name(client_p, HIDE_IP), IsExemptKline(client_p) ? "k" : "g"); |
| 449 |
+ |
return; |
| 450 |
+ |
} |
| 451 |
+ |
|
| 452 |
|
type_string = gline_string; |
| 453 |
|
break; |
| 454 |
|
case CONF_XLINE: |