-unsigned int get_client_ping(struct Client *acptr)
-{
- unsigned int ping = 0;
- unsigned int ping2;
- struct ConfItem *aconf;
- struct SLink *link;
-
- link = cli_confs(acptr);
-
- if (link) {
- while (link) {
- aconf = link->value.aconf;
- if (aconf->status & (CONF_CLIENT | CONF_SERVER)) {
- ping2 = get_conf_ping(aconf);
- if ((ping2 != BAD_PING) && ((ping > ping2) || !ping))
- ping = ping2;
- }
- link = link->next;
- }
- }
- else {
- ping = feature_int(FEAT_PINGFREQUENCY);
- Debug((DEBUG_DEBUG, "No Attached Confs for: %s", cli_name(acptr)));
- }
- if (ping <= 0)
- ping = feature_int(FEAT_PINGFREQUENCY);
- Debug((DEBUG_DEBUG, "Client %s Ping %d", cli_name(acptr), ping));
- return (ping);
-}
-
-unsigned int get_con_freq(struct ConnectionClass * clptr)
-{
- if (clptr)
- return (ConFreq(clptr));
- else
- return feature_int(FEAT_CONNECTFREQUENCY);
-}
-
-/*
- * When adding a class, check to see if it is already present first.
- * if so, then update the information for that class, rather than create
- * a new entry for it and later delete the old entry.
- * if no present entry is found, then create a new one and add it in
- * immeadiately after the first one (class 0).
+/** Make sure we have a connection class named \a name.
+ * If one does not exist, create it. Then set its ping frequency,
+ * connection frequency, maximum link count, and max SendQ according
+ * to the parameters.
+ * @param[in] name Connection class name.
+ * @param[in] ping Ping frequency for clients in this class.
+ * @param[in] confreq Connection frequency for clients.
+ * @param[in] maxli Maximum link count for class.
+ * @param[in] sendq Max SendQ for clients.