m_starttls: advertise tls cap only if SSL is possible

This commit is contained in:
Doug Freed 2023-02-21 20:47:11 +00:00
parent 1ccc642277
commit dd3355732b

View file

@ -45,7 +45,14 @@ mapi_clist_av1 starttls_clist[] = { &starttls_msgtab, NULL };
unsigned int CLICAP_TLS = 0;
static bool
tls_visible(struct Client *ignored)
{
return ircd_ssl_ok && get_ssld_count();
}
static struct ClientCapability capdata_tls = {
.visible = tls_visible,
.flags = CLICAP_FLAGS_PRIORITY,
};