1023 |
|
ip_found->count++; |
1024 |
|
SetIpHash(client_p); |
1025 |
|
|
1026 |
< |
aconf = (struct AccessItem *)map_to_conf(conf); |
1026 |
> |
aconf = map_to_conf(conf); |
1027 |
|
if (aconf->class_ptr == NULL) |
1028 |
|
return NOT_AUTHORIZED; /* If class is missing, this is best */ |
1029 |
|
|
1030 |
< |
aclass = (struct ClassItem *)map_to_conf(aconf->class_ptr); |
1030 |
> |
aclass = map_to_conf(aconf->class_ptr); |
1031 |
|
|
1032 |
|
count_user_host(client_p->username, client_p->host, |
1033 |
|
&global, &local, &ident); |
1038 |
|
*/ |
1039 |
|
if (MaxTotal(aclass) != 0 && CurrUserCount(aclass) >= MaxTotal(aclass)) |
1040 |
|
a_limit_reached = 1; |
1041 |
< |
else if (MaxPerIp(aclass) != 0 && ip_found->count >= MaxPerIp(aclass)) |
1041 |
> |
else if (MaxPerIp(aclass) != 0 && ip_found->count > MaxPerIp(aclass)) |
1042 |
|
a_limit_reached = 1; |
1043 |
|
else if (MaxLocal(aclass) != 0 && local >= MaxLocal(aclass)) |
1044 |
|
a_limit_reached = 1; |
1051 |
|
if (a_limit_reached) |
1052 |
|
{ |
1053 |
|
if (!IsConfExemptLimits(aconf)) |
1054 |
< |
return TOO_MANY; /* Already at maximum allowed */ |
1054 |
> |
return TOO_MANY; /* Already at maximum allowed */ |
1055 |
|
|
1056 |
|
sendto_one(client_p, |
1057 |
|
":%s NOTICE %s :*** Your connection class is full, " |