summaryrefslogtreecommitdiff
path: root/src/modules/m_customtitle.cpp
diff options
context:
space:
mode:
authorattilamolnar <attilamolnar@hush.com>2012-10-06 21:43:20 +0200
committerattilamolnar <attilamolnar@hush.com>2012-11-12 21:48:42 +0100
commita4db7bf9af00b32d4f5c1922997d02b0b8be59e5 (patch)
tree2fd4c4ee2344300285f919968760f27f9ca41df4 /src/modules/m_customtitle.cpp
parent62149fcd86711d3ca7457a327c4e8fa2e7d85582 (diff)
Remove usage of the deprecated ConfigReader
Diffstat (limited to 'src/modules/m_customtitle.cpp')
-rw-r--r--src/modules/m_customtitle.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/modules/m_customtitle.cpp b/src/modules/m_customtitle.cpp
index fd5ec6f09..a9704e7de 100644
--- a/src/modules/m_customtitle.cpp
+++ b/src/modules/m_customtitle.cpp
@@ -58,15 +58,15 @@ class CommandTitle : public Command
snprintf(TheHost,MAXBUF,"%s@%s",user->ident.c_str(), user->host.c_str());
snprintf(TheIP, MAXBUF,"%s@%s",user->ident.c_str(), user->GetIPString());
- ConfigReader Conf;
- for (int i=0; i<Conf.Enumerate("title"); i++)
+ ConfigTagList tags = ServerInstance->Config->ConfTags("title");
+ for (ConfigIter i = tags.first; i != tags.second; ++i)
{
- std::string Name = Conf.ReadValue("title", "name", "", i);
- std::string pass = Conf.ReadValue("title", "password", "", i);
- std::string hash = Conf.ReadValue("title", "hash", "", i);
- std::string host = Conf.ReadValue("title", "host", "*@*", i);
- std::string title = Conf.ReadValue("title", "title", "", i);
- std::string vhost = Conf.ReadValue("title", "vhost", "", i);
+ std::string Name = i->second->getString("name");
+ std::string pass = i->second->getString("password");
+ std::string hash = i->second->getString("hash");
+ std::string host = i->second->getString("host", "*@*");
+ std::string title = i->second->getString("title");
+ std::string vhost = i->second->getString("vhost");
if (!strcmp(Name.c_str(),parameters[0].c_str()) && !ServerInstance->PassCompare(user, pass.c_str(), parameters[1].c_str(), hash.c_str()) && OneOfMatches(TheHost,TheIP,host.c_str()) && !title.empty())
{