aboutsummaryrefslogtreecommitdiffstats
path: root/src/modules/m_hostchange.cpp
diff options
context:
space:
mode:
authorGravatar Daniel De Graaf2010-04-13 16:04:18 -0500
committerGravatar Daniel De Graaf2010-08-03 17:32:42 -0400
commit8cc0bf1b8b4c3e49a8ef08e1fb0833d77d45346b (patch)
tree7e409d61cc8a5be30a1be0f8969cde91d6bf4bc4 /src/modules/m_hostchange.cpp
parentChange UserChanList to an intrusive-style linked list (diff)
Drop ConfigReader::Enumerate
Diffstat (limited to 'src/modules/m_hostchange.cpp')
-rw-r--r--src/modules/m_hostchange.cpp11
1 files changed, 6 insertions, 5 deletions
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;