From e77259697ecfc82c58ba358a1efe25f288414c7e Mon Sep 17 00:00:00 2001 From: danieldg Date: Thu, 21 Jan 2010 20:47:10 +0000 Subject: Put ConfigReader deprecation warning in logs git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@12310 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules.cpp | 2 ++ src/modules/extra/m_ssl_gnutls.cpp | 14 ++++++-------- 2 files changed, 8 insertions(+), 8 deletions(-) (limited to 'src') diff --git a/src/modules.cpp b/src/modules.cpp index 11b06e960..529e88b07 100644 --- a/src/modules.cpp +++ b/src/modules.cpp @@ -558,6 +558,8 @@ const std::vector ModuleManager::GetAllModuleNames(int filter) ConfigReader::ConfigReader() { this->error = 0; + ServerInstance->Logs->Log("MODULE", DEBUG, "ConfigReader is deprecated in 2.0; " + "use ServerInstance->Config->ConfValue(\"key\") or ->ConfTags(\"key\") instead"); } diff --git a/src/modules/extra/m_ssl_gnutls.cpp b/src/modules/extra/m_ssl_gnutls.cpp index 1ebec075b..df3709f10 100644 --- a/src/modules/extra/m_ssl_gnutls.cpp +++ b/src/modules/extra/m_ssl_gnutls.cpp @@ -168,8 +168,6 @@ class ModuleSSLGnuTLS : public Module void OnRehash(User* user) { - ConfigReader Conf; - sslports.clear(); for (size_t i = 0; i < ServerInstance->ports.size(); i++) @@ -196,13 +194,13 @@ class ModuleSSLGnuTLS : public Module OnRehash(user); - ConfigReader Conf; + ConfigTag* Conf = ServerInstance->Config->ConfValue("gnutls"); - cafile = Conf.ReadValue("gnutls", "cafile", 0); - crlfile = Conf.ReadValue("gnutls", "crlfile", 0); - certfile = Conf.ReadValue("gnutls", "certfile", 0); - keyfile = Conf.ReadValue("gnutls", "keyfile", 0); - dh_bits = Conf.ReadInteger("gnutls", "dhbits", 0, false); + cafile = Conf->getString("cafile"); + crlfile = Conf->getString("crlfile"); + certfile = Conf->getString("certfile"); + keyfile = Conf->getString("keyfile"); + dh_bits = Conf->getInt("dhbits"); // Set all the default values needed. if (cafile.empty()) -- cgit v1.2.3