summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>2010-01-21 20:47:10 +0000
committerdanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>2010-01-21 20:47:10 +0000
commite77259697ecfc82c58ba358a1efe25f288414c7e (patch)
treec57b59998e33c4453d9abcda24c3abc0378195d7 /src
parentd29ca254a4a9062ecaffe9395454f3a654d4e06a (diff)
Put ConfigReader deprecation warning in logs
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@12310 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src')
-rw-r--r--src/modules.cpp2
-rw-r--r--src/modules/extra/m_ssl_gnutls.cpp14
2 files changed, 8 insertions, 8 deletions
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<std::string> 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())