summaryrefslogtreecommitdiff
path: root/src/modules/m_permchannels.cpp
diff options
context:
space:
mode:
authordanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>2010-01-19 02:28:30 +0000
committerdanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>2010-01-19 02:28:30 +0000
commit0429d86a7afa7d5c1e27e48f27db0687d2688d87 (patch)
treeb25b6bfbc41f67156a7a5b4d9b4cca34e3a9f26d /src/modules/m_permchannels.cpp
parent066cad22e48e111de9a993c9ebaddb275b773a75 (diff)
Clean up some slow iterations
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@12300 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules/m_permchannels.cpp')
-rw-r--r--src/modules/m_permchannels.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/modules/m_permchannels.cpp b/src/modules/m_permchannels.cpp
index fbbd38c15..e3d18cc33 100644
--- a/src/modules/m_permchannels.cpp
+++ b/src/modules/m_permchannels.cpp
@@ -217,15 +217,16 @@ public:
* Process config-defined list of permanent channels.
* -- w00t
*/
- ConfigReader MyConf;
- permchannelsconf = MyConf.ReadValue("permchanneldb", "filename", "", 0, false);
+ permchannelsconf = ServerInstance->Config->ConfValue("permchanneldb")->getString("filename");
- for (int i = 0; i < MyConf.Enumerate("permchannels"); i++)
+ ConfigTagList permchannels = ServerInstance->Config->ConfTags("permchannels");
+ for (ConfigIter i = permchannels.first; i != permchannels.second; ++i)
{
- std::string channel = MyConf.ReadValue("permchannels", "channel", i);
- std::string topic = MyConf.ReadValue("permchannels", "topic", i);
- std::string modes = MyConf.ReadValue("permchannels", "modes", i);
+ ConfigTag* tag = i->second;
+ std::string channel = tag->getString("channel");
+ std::string topic = tag->getString("topic");
+ std::string modes = tag->getString("modes");
if (channel.empty())
{