From dd3355732b392f8be9f326feb1849b2f46c9a1fc Mon Sep 17 00:00:00 2001 From: Doug Freed Date: Tue, 21 Feb 2023 20:47:11 +0000 Subject: [PATCH] m_starttls: advertise tls cap only if SSL is possible --- modules/m_starttls.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/modules/m_starttls.c b/modules/m_starttls.c index bc25e9cc..c87489dc 100644 --- a/modules/m_starttls.c +++ b/modules/m_starttls.c @@ -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, };