diff options
author | w00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7> | 2008-02-02 12:42:44 +0000 |
---|---|---|
committer | w00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7> | 2008-02-02 12:42:44 +0000 |
commit | a94af5f308268cc76fb8c3b59b6443817ba1a8d8 (patch) | |
tree | d44b86272ba935f009f58e7c2ba293ca2905ad2d /src/modules | |
parent | c8dd9bd8361733743b2c233640a0607edaa39654 (diff) |
Patch: /rehash (not /rehash ssl) will now rebind SSL ports, but not dh params etc. Closes #391. Thanks dz.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8786 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules')
-rw-r--r-- | src/modules/extra/m_ssl_gnutls.cpp | 9 | ||||
-rw-r--r-- | src/modules/extra/m_ssl_openssl.cpp | 9 |
2 files changed, 12 insertions, 6 deletions
diff --git a/src/modules/extra/m_ssl_gnutls.cpp b/src/modules/extra/m_ssl_gnutls.cpp index 0491b3c20..554dd17dd 100644 --- a/src/modules/extra/m_ssl_gnutls.cpp +++ b/src/modules/extra/m_ssl_gnutls.cpp @@ -117,9 +117,6 @@ class ModuleSSLGnuTLS : public Module virtual void OnRehash(User* user, const std::string ¶m) { - if(param != "ssl") - return; - Conf = new ConfigReader(ServerInstance); for(unsigned int i = 0; i < listenports.size(); i++) @@ -168,6 +165,12 @@ class ModuleSSLGnuTLS : public Module } } + if(param != "ssl") + { + delete Conf; + return; + } + std::string confdir(ServerInstance->ConfigFileName); // +1 so we the path ends with a / confdir = confdir.substr(0, confdir.find_last_of('/') + 1); diff --git a/src/modules/extra/m_ssl_openssl.cpp b/src/modules/extra/m_ssl_openssl.cpp index 562b5432b..f54e041f3 100644 --- a/src/modules/extra/m_ssl_openssl.cpp +++ b/src/modules/extra/m_ssl_openssl.cpp @@ -156,9 +156,6 @@ class ModuleSSLOpenSSL : public Module virtual void OnRehash(User* user, const std::string ¶m) { - if (param != "ssl") - return; - ConfigReader Conf(ServerInstance); for (unsigned int i = 0; i < listenports.size(); i++) @@ -210,6 +207,12 @@ class ModuleSSLOpenSSL : public Module if (!sslports.empty()) sslports.erase(sslports.end() - 1); + if (param != "ssl") + { + delete Conf; + return; + } + std::string confdir(ServerInstance->ConfigFileName); // +1 so we the path ends with a / confdir = confdir.substr(0, confdir.find_last_of('/') + 1); |