summaryrefslogtreecommitdiff
path: root/src/modules/extra/m_ssl_gnutls.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules/extra/m_ssl_gnutls.cpp')
-rw-r--r--src/modules/extra/m_ssl_gnutls.cpp27
1 files changed, 16 insertions, 11 deletions
diff --git a/src/modules/extra/m_ssl_gnutls.cpp b/src/modules/extra/m_ssl_gnutls.cpp
index 01e700885..07e11aaa7 100644
--- a/src/modules/extra/m_ssl_gnutls.cpp
+++ b/src/modules/extra/m_ssl_gnutls.cpp
@@ -183,21 +183,26 @@ class ModuleSSLGnuTLS : public Module
{
sslports.clear();
- for (size_t i = 0; i < ServerInstance->ports.size(); i++)
+ ConfigTag* Conf = ServerInstance->Config->ConfValue("gnutls");
+
+ if (Conf->getBool("showports", true))
{
- ListenSocket* port = ServerInstance->ports[i];
- if (port->bind_tag->getString("ssl") != "gnutls")
- continue;
+ for (size_t i = 0; i < ServerInstance->ports.size(); i++)
+ {
+ ListenSocket* port = ServerInstance->ports[i];
+ if (port->bind_tag->getString("ssl") != "gnutls")
+ continue;
- const std::string& portid = port->bind_desc;
- ServerInstance->Logs->Log("m_ssl_gnutls", DEFAULT, "m_ssl_gnutls.so: Enabling SSL for port %s", portid.c_str());
+ const std::string& portid = port->bind_desc;
+ 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(";");
- }
+ if (port->bind_tag->getString("type", "clients") == "clients" && port->bind_addr != "127.0.0.1")
+ sslports.append(portid).append(";");
+ }
- if (!sslports.empty())
- sslports.erase(sslports.end() - 1);
+ if (!sslports.empty())
+ sslports.erase(sslports.end() - 1);
+ }
}
void OnModuleRehash(User* user, const std::string &param)