X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_restrictchans.cpp;h=557515fe041a307607715895758f4c572a28b0ed;hb=b43fc66c17c2bef6dca66a966676b8128d5774ee;hp=8cc882d9050e736d0d387180a92e6962dc5fbf9c;hpb=a59d08fffd3dc8a9850ce34c9928fb6382b9b37f;p=user%2Fhenk%2Fcode%2Finspircd.git 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()); }