diff options
author | attilamolnar <attilamolnar@hush.com> | 2012-07-21 14:16:07 +0200 |
---|---|---|
committer | attilamolnar <attilamolnar@hush.com> | 2012-07-21 16:00:30 +0200 |
commit | d30cdacab7100426c3773eafffd50aebf8155bba (patch) | |
tree | 35a4551556f08d9994059cb65795a5b9b1d912d0 | |
parent | 290bf076e06da73cb2819a77dc5985e82b6a73a8 (diff) |
m_ssl_gnutls Advertise only one ssl port by default in ISUPPORT
Fixes #261 reported by @Shawn-Smith and others
-rw-r--r-- | src/modules/extra/m_ssl_gnutls.cpp | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/src/modules/extra/m_ssl_gnutls.cpp b/src/modules/extra/m_ssl_gnutls.cpp index 8254fec9d..428965c03 100644 --- a/src/modules/extra/m_ssl_gnutls.cpp +++ b/src/modules/extra/m_ssl_gnutls.cpp @@ -228,11 +228,20 @@ class ModuleSSLGnuTLS : public Module ServerInstance->Logs->Log("m_ssl_gnutls", DEFAULT, "m_ssl_gnutls.so: Enabling SSL for port %s", portid.c_str()); if (port->bind_tag->getString("type", "clients") == "clients" && port->bind_addr != "127.0.0.1") - sslports.append(portid).append(";"); + { + /* + * Found an SSL port for clients that is not bound to 127.0.0.1 and handled by us, display + * the IP:port in ISUPPORT. + * + * We used to advertise all ports seperated by a ';' char that matched the above criteria, + * but this resulted in too long ISUPPORT lines if there were lots of ports to be displayed. + * To solve this by default we now only display the first IP:port found and let the user + * configure the exact value for the 005 token, if necessary. + */ + sslports = portid; + break; + } } - - if (!sslports.empty()) - sslports.erase(sslports.end() - 1); } } |