From 8cc0bf1b8b4c3e49a8ef08e1fb0833d77d45346b Mon Sep 17 00:00:00 2001 From: Daniel De Graaf Date: Tue, 13 Apr 2010 16:04:18 -0500 Subject: Drop ConfigReader::Enumerate --- src/modules/m_hostchange.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'src/modules/m_hostchange.cpp') diff --git a/src/modules/m_hostchange.cpp b/src/modules/m_hostchange.cpp index 20c7e5bc2..d38af4992 100644 --- a/src/modules/m_hostchange.cpp +++ b/src/modules/m_hostchange.cpp @@ -70,12 +70,13 @@ class ModuleHostChange : public Module delete i->second; } hostchanges.clear(); - for (int index = 0; index < Conf.Enumerate("hostchange"); index++) + ConfigTagList tags = ServerInstance->Config->ConfTags("hostchange"); + for (ConfigIter i = tags.first; i != tags.second; ++i) { - std::string mask = Conf.ReadValue("hostchange", "mask", index); - std::string ports = Conf.ReadValue("hosthange", "ports", index); - std::string action = Conf.ReadValue("hostchange", "action", index); - std::string newhost = Conf.ReadValue("hostchange", "value", index); + std::string mask = i->second->getString("mask"); + std::string ports = i->second->getString("ports"); + std::string action = i->second->getString("action"); + std::string newhost = i->second->getString("value"); Host* x = new Host; x->action = action; x->ports = ports; -- cgit v1.3.1-10-gc9f91