307 |
aclass->ping_freq = DEFAULT_PINGFREQUENCY; |
aclass->ping_freq = DEFAULT_PINGFREQUENCY; |
308 |
aclass->max_total = MAXIMUM_LINKS_DEFAULT; |
aclass->max_total = MAXIMUM_LINKS_DEFAULT; |
309 |
aclass->max_sendq = DEFAULT_SENDQ; |
aclass->max_sendq = DEFAULT_SENDQ; |
310 |
|
aclass->max_recvq = DEFAULT_RECVQ; |
311 |
|
|
312 |
break; |
break; |
313 |
|
|
640 |
conf->name, classitem->ping_freq, |
conf->name, classitem->ping_freq, |
641 |
classitem->con_freq, |
classitem->con_freq, |
642 |
classitem->max_total, classitem->max_sendq, |
classitem->max_total, classitem->max_sendq, |
643 |
|
classitem->max_recvq, |
644 |
classitem->curr_user_count, |
classitem->curr_user_count, |
645 |
classitem->number_per_cidr, classitem->cidr_bitlen_ipv4, |
classitem->number_per_cidr, classitem->cidr_bitlen_ipv4, |
646 |
classitem->number_per_cidr, classitem->cidr_bitlen_ipv6, |
classitem->number_per_cidr, classitem->cidr_bitlen_ipv6, |
1850 |
ConfigFileEntry.true_no_oper_flood = 0; |
ConfigFileEntry.true_no_oper_flood = 0; |
1851 |
ConfigFileEntry.oper_pass_resv = 1; |
ConfigFileEntry.oper_pass_resv = 1; |
1852 |
ConfigFileEntry.max_targets = MAX_TARGETS_DEFAULT; |
ConfigFileEntry.max_targets = MAX_TARGETS_DEFAULT; |
|
ConfigFileEntry.client_flood = CLIENT_FLOOD_DEFAULT; |
|
1853 |
ConfigFileEntry.oper_only_umodes = UMODE_DEBUG; |
ConfigFileEntry.oper_only_umodes = UMODE_DEBUG; |
1854 |
ConfigFileEntry.oper_umodes = UMODE_BOTS | UMODE_LOCOPS | UMODE_SERVNOTICE | |
ConfigFileEntry.oper_umodes = UMODE_BOTS | UMODE_LOCOPS | UMODE_SERVNOTICE | |
1855 |
UMODE_OPERWALL | UMODE_WALLOP; |
UMODE_OPERWALL | UMODE_WALLOP; |
1876 |
if (ConfigFileEntry.service_name == NULL) |
if (ConfigFileEntry.service_name == NULL) |
1877 |
DupString(ConfigFileEntry.service_name, SERVICE_NAME_DEFAULT); |
DupString(ConfigFileEntry.service_name, SERVICE_NAME_DEFAULT); |
1878 |
|
|
|
if ((ConfigFileEntry.client_flood < CLIENT_FLOOD_MIN) || |
|
|
(ConfigFileEntry.client_flood > CLIENT_FLOOD_MAX)) |
|
|
ConfigFileEntry.client_flood = CLIENT_FLOOD_MAX; |
|
|
|
|
1879 |
ConfigFileEntry.max_watch = IRCD_MAX(ConfigFileEntry.max_watch, WATCHSIZE_MIN); |
ConfigFileEntry.max_watch = IRCD_MAX(ConfigFileEntry.max_watch, WATCHSIZE_MIN); |
1880 |
} |
} |
1881 |
|
|
2718 |
aclass->ping_freq = DEFAULT_PINGFREQUENCY; |
aclass->ping_freq = DEFAULT_PINGFREQUENCY; |
2719 |
aclass->max_total = MAXIMUM_LINKS_DEFAULT; |
aclass->max_total = MAXIMUM_LINKS_DEFAULT; |
2720 |
aclass->max_sendq = DEFAULT_SENDQ; |
aclass->max_sendq = DEFAULT_SENDQ; |
2721 |
|
aclass->max_recvq = DEFAULT_RECVQ; |
2722 |
|
|
2723 |
client_check_cb = register_callback("check_client", check_client); |
client_check_cb = register_callback("check_client", check_client); |
2724 |
} |
} |
2764 |
return DEFAULT_SENDQ; |
return DEFAULT_SENDQ; |
2765 |
} |
} |
2766 |
|
|
2767 |
|
unsigned int |
2768 |
|
get_recvq(struct Client *client_p) |
2769 |
|
{ |
2770 |
|
unsigned int recvq = DEFAULT_RECVQ; |
2771 |
|
dlink_node *cnode; |
2772 |
|
struct ConfItem *class_conf; |
2773 |
|
struct ClassItem *aclass; |
2774 |
|
struct AccessItem *aconf; |
2775 |
|
|
2776 |
|
assert(!IsMe(client_p)); |
2777 |
|
|
2778 |
|
if ((cnode = client_p->localClient->confs.head)) |
2779 |
|
{ |
2780 |
|
struct ConfItem *conf = cnode->data; |
2781 |
|
|
2782 |
|
assert((conf->type == CLIENT_TYPE) || (conf->type == SERVER_TYPE) || |
2783 |
|
(conf->type == OPER_TYPE)); |
2784 |
|
|
2785 |
|
aconf = map_to_conf(conf); |
2786 |
|
|
2787 |
|
if ((class_conf = aconf->class_ptr) == NULL) |
2788 |
|
return DEFAULT_RECVQ; /* TBV: shouldn't be possible at all */ |
2789 |
|
|
2790 |
|
aclass = map_to_conf(class_conf); |
2791 |
|
recvq = aclass->max_recvq; |
2792 |
|
return recvq; |
2793 |
|
} |
2794 |
|
|
2795 |
|
/* XXX return a default? |
2796 |
|
* if here, then there wasn't an attached conf with a recvq |
2797 |
|
* that is very bad -Dianora |
2798 |
|
*/ |
2799 |
|
return DEFAULT_RECVQ; |
2800 |
|
} |
2801 |
|
|
2802 |
/* conf_add_class_to_conf() |
/* conf_add_class_to_conf() |
2803 |
* |
* |
2804 |
* inputs - pointer to config item |
* inputs - pointer to config item |