diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/modules/extra/m_ssl_gnutls.cpp | 7 | ||||
-rw-r--r-- | src/modules/extra/m_ssl_openssl.cpp | 7 |
2 files changed, 14 insertions, 0 deletions
diff --git a/src/modules/extra/m_ssl_gnutls.cpp b/src/modules/extra/m_ssl_gnutls.cpp index a031a13da..ea304be5d 100644 --- a/src/modules/extra/m_ssl_gnutls.cpp +++ b/src/modules/extra/m_ssl_gnutls.cpp @@ -80,6 +80,8 @@ class ModuleSSLGnuTLS : public Module std::string crlfile; int dh_bits; + int clientactive; + public: ModuleSSLGnuTLS(InspIRCd* Me) @@ -119,6 +121,7 @@ class ModuleSSLGnuTLS : public Module } listenports.clear(); + clientactive = 0; for(int i = 0; i < Conf->Enumerate("bind"); i++) { @@ -131,6 +134,7 @@ class ModuleSSLGnuTLS : public Module long portno = -1; while ((portno = portrange.GetToken())) { + clientactive++; try { if (ServerInstance->Config->AddIOHook(portno, this)) @@ -531,6 +535,9 @@ class ModuleSSLGnuTLS : public Module // :kenny.chatspike.net 320 Om Epy|AFK :is a Secure Connection virtual void OnWhois(userrec* source, userrec* dest) { + if (!clientactive) + return; + // Bugfix, only send this numeric for *our* SSL users if(dest->GetExt("ssl", dummy) || (IS_LOCAL(dest) && isin(dest->GetPort(), listenports))) { diff --git a/src/modules/extra/m_ssl_openssl.cpp b/src/modules/extra/m_ssl_openssl.cpp index 5e6166fa4..7bb707d2c 100644 --- a/src/modules/extra/m_ssl_openssl.cpp +++ b/src/modules/extra/m_ssl_openssl.cpp @@ -114,6 +114,8 @@ class ModuleSSLOpenSSL : public Module // std::string crlfile; std::string dhfile; + int clientactive; + public: InspIRCd* PublicInstance; @@ -156,6 +158,7 @@ class ModuleSSLOpenSSL : public Module } listenports.clear(); + clientactive = 0; for (int i = 0; i < Conf->Enumerate("bind"); i++) { @@ -168,6 +171,7 @@ class ModuleSSLOpenSSL : public Module long portno = -1; while ((portno = portrange.GetToken())) { + clientactive++; try { if (ServerInstance->Config->AddIOHook(portno, this)) @@ -626,6 +630,9 @@ class ModuleSSLOpenSSL : public Module // :kenny.chatspike.net 320 Om Epy|AFK :is a Secure Connection virtual void OnWhois(userrec* source, userrec* dest) { + if (!clientactive) + return; + // Bugfix, only send this numeric for *our* SSL users if (dest->GetExt("ssl", dummy) || (IS_LOCAL(dest) && isin(dest->GetPort(), listenports))) { |