]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_restrictchans.cpp
Fix NICKLOCK/SANICK errors with Q:lined nicks
[user/henk/code/inspircd.git] / src / modules / m_restrictchans.cpp
index 8cc882d9050e736d0d387180a92e6962dc5fbf9c..8fac7527bef64b1f56648aee151a374fe6c20231 100644 (file)
@@ -2,7 +2,7 @@
  *       | Inspire Internet Relay Chat Daemon |
  *       +------------------------------------+
  *
- *  InspIRCd: (C) 2002-2009 InspIRCd Development Team
+ *  InspIRCd: (C) 2002-2010 InspIRCd Development Team
  * See: http://wiki.inspircd.org/Credits
  *
  * This program is free but copyrighted software; see
@@ -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());
                }