]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_restrictchans.cpp
Make irc::sockets::* parameters consistent, add irc::sockets::mask
[user/henk/code/inspircd.git] / src / modules / m_restrictchans.cpp
index 8cc882d9050e736d0d387180a92e6962dc5fbf9c..557515fe041a307607715895758f4c572a28b0ed 100644 (file)
@@ -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());
                }