summaryrefslogtreecommitdiff
path: root/src/modules/m_restrictchans.cpp
diff options
context:
space:
mode:
authordanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>2009-10-21 23:46:13 +0000
committerdanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>2009-10-21 23:46:13 +0000
commitd8f98565a8617658f610bc94a5d87266930beee4 (patch)
tree365a153c59bc8b521b094c27f25b484a69e5154b /src/modules/m_restrictchans.cpp
parent984cc96a1f832abf9b5fcfddcd8260c5b12bd2a9 (diff)
Use ConfigTagList as a faster access method for access to configuration
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11948 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules/m_restrictchans.cpp')
-rw-r--r--src/modules/m_restrictchans.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/modules/m_restrictchans.cpp b/src/modules/m_restrictchans.cpp
index 8cc882d90..557515fe0 100644
--- a/src/modules/m_restrictchans.cpp
+++ b/src/modules/m_restrictchans.cpp
@@ -22,11 +22,10 @@ class ModuleRestrictChans : public Module
void ReadConfig()
{
allowchans.clear();
- for (int i = 0;; i++)
+ ConfigTagList tags = ServerInstance->Config->ConfTags("allowchannel");
+ for(ConfigIter i = tags.first; i != tags.second; ++i)
{
- ConfigTag* tag = ServerInstance->Config->ConfValue("allowchannel", i);
- if (!tag)
- return;
+ ConfigTag* tag = i->second;
std::string txt = tag->getString("name");
allowchans.insert(txt.c_str());
}