- /*
- * See if the newly found server is behind a guaranteed
- * leaf. If so, close the link.
- *
- */
- RB_DLINK_FOREACH(ptr, hubleaf_conf_list.head)
- {
- hub_p = ptr->data;
-
- if(match(hub_p->server, client_p->name) && match(hub_p->host, name))
- {
- if(hub_p->flags & CONF_HUB)
- hlined++;
- else
- llined++;
- }
- }
-
- /* Ok, this way this works is
- *
- * A server can have a CONF_HUB allowing it to introduce servers
- * behind it.
- *
- * connect {
- * name = "irc.bighub.net";
- * hub_mask="*";
- * ...
- *
- * That would allow "irc.bighub.net" to introduce anything it wanted..
- *
- * However
- *
- * connect {
- * name = "irc.somehub.fi";
- * hub_mask="*";
- * leaf_mask="*.edu";
- *...
- * Would allow this server in finland to hub anything but
- * .edu's
- */
-
- /* Ok, check client_p can hub the new server */
- if(!hlined)
- {
- /* OOOPs nope can't HUB */
- sendto_realops_snomask(SNO_GENERAL, L_ALL, "Non-Hub link %s introduced %s.",
- client_p->name, name);
- ilog(L_SERVER, "Non-Hub link %s introduced %s.",
- client_p->name, name);
-
- snprintf(squitreason, sizeof squitreason,
- "No matching hub_mask for %s",
- name);
- exit_client(NULL, client_p, &me, squitreason);
- return;
- }
-
- /* Check for the new server being leafed behind this HUB */
- if(llined)
- {
- /* OOOPs nope can't HUB this leaf */
- sendto_realops_snomask(SNO_GENERAL, L_ALL,
- "Link %s introduced leafed server %s.",
- client_p->name, name);
- ilog(L_SERVER, "Link %s introduced leafed server %s.",
- client_p->name, name);
-
- snprintf(squitreason, sizeof squitreason,
- "Matching leaf_mask for %s",
- name);
- exit_client(NULL, client_p, &me, squitreason);
- return;
- }
-
-
-