| 96 |
|
{ |
| 97 |
|
struct irc_ssaddr iphost, *piphost; |
| 98 |
|
struct MaskItem *conf; |
| 99 |
< |
int t; |
| 99 |
> |
int t = 0; |
| 100 |
> |
int aftype = 0; |
| 101 |
|
|
| 102 |
|
if ((t = parse_netmask(host, &iphost, NULL)) != HM_HOST) |
| 103 |
|
{ |
| 104 |
|
#ifdef IPV6 |
| 105 |
|
if (t == HM_IPV6) |
| 106 |
< |
t = AF_INET6; |
| 106 |
> |
aftype = AF_INET6; |
| 107 |
|
else |
| 108 |
|
#endif |
| 109 |
< |
t = AF_INET; |
| 109 |
> |
aftype = AF_INET; |
| 110 |
|
piphost = &iphost; |
| 111 |
|
} |
| 112 |
|
else |
| 112 |
– |
{ |
| 113 |
– |
t = 0; |
| 113 |
|
piphost = NULL; |
| 115 |
– |
} |
| 114 |
|
|
| 115 |
< |
if ((conf = find_conf_by_address(host, piphost, CONF_DLINE, t, NULL, NULL, 0))) |
| 115 |
> |
if ((conf = find_conf_by_address(host, piphost, CONF_DLINE, aftype, NULL, NULL, 0))) |
| 116 |
|
{ |
| 117 |
|
if (IsConfDatabase(conf)) |
| 118 |
|
{ |
| 146 |
|
struct irc_ssaddr daddr; |
| 147 |
|
struct MaskItem *conf=NULL; |
| 148 |
|
time_t tkline_time=0; |
| 149 |
< |
int bits, t; |
| 149 |
> |
int bits = 0, aftype = 0, t = 0; |
| 150 |
|
const char *current_date = NULL; |
| 151 |
|
time_t cur_time; |
| 152 |
|
char hostip[HOSTIPLEN + 1]; |
| 229 |
|
|
| 230 |
|
#ifdef IPV6 |
| 231 |
|
if (t == HM_IPV6) |
| 232 |
< |
t = AF_INET6; |
| 232 |
> |
aftype = AF_INET6; |
| 233 |
|
else |
| 234 |
|
#endif |
| 235 |
< |
t = AF_INET; |
| 235 |
> |
aftype = AF_INET; |
| 236 |
|
|
| 237 |
|
parse_netmask(dlhost, &daddr, NULL); |
| 238 |
|
|
| 239 |
< |
if ((conf = find_dline_conf(&daddr, t)) != NULL) |
| 239 |
> |
if ((conf = find_dline_conf(&daddr, aftype)) != NULL) |
| 240 |
|
{ |
| 241 |
|
creason = conf->reason ? conf->reason : def_reason; |
| 242 |
|
if (IsConfExemptKline(conf)) |
| 281 |
|
struct irc_ssaddr daddr; |
| 282 |
|
struct MaskItem *conf=NULL; |
| 283 |
|
time_t tkline_time=0; |
| 284 |
< |
int bits, t; |
| 284 |
> |
int bits = 0, aftype = 0, t = 0; |
| 285 |
|
const char *current_date = NULL; |
| 286 |
|
time_t cur_time; |
| 287 |
|
char hostip[HOSTIPLEN + 1]; |
| 348 |
|
|
| 349 |
|
#ifdef IPV6 |
| 350 |
|
if (t == HM_IPV6) |
| 351 |
< |
t = AF_INET6; |
| 351 |
> |
aftype= AF_INET6; |
| 352 |
|
else |
| 353 |
|
#endif |
| 354 |
< |
t = AF_INET; |
| 354 |
> |
aftype = AF_INET; |
| 355 |
|
|
| 356 |
|
parse_netmask(dlhost, &daddr, NULL); |
| 357 |
|
|
| 358 |
< |
if ((conf = find_dline_conf(&daddr, t)) != NULL) |
| 358 |
> |
if ((conf = find_dline_conf(&daddr, aftype)) != NULL) |
| 359 |
|
{ |
| 360 |
|
creason = conf->reason ? conf->reason : def_reason; |
| 361 |
|
if (IsConfExemptKline(conf)) |