]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules.cpp
Add InspIRCd::GetChans(), remove ChannelCount()
[user/henk/code/inspircd.git] / src / modules.cpp
index 3723b09c333ed537fbb8f0504681b912c2a49ba5..62c3aa213a38e0a45c959ff305fc87669f4890e8 100644 (file)
@@ -390,7 +390,8 @@ void ModuleManager::DoSafeUnload(Module* mod)
        std::vector<reference<ExtensionItem> > items;
        ServerInstance->Extensions.BeginUnregister(modfind->second, items);
        /* Give the module a chance to tidy out all its metadata */
-       for (chan_hash::iterator c = ServerInstance->chanlist->begin(); c != ServerInstance->chanlist->end(); )
+       const chan_hash& chans = ServerInstance->GetChans();
+       for (chan_hash::const_iterator c = chans.begin(); c != chans.end(); )
        {
                Channel* chan = c->second;
                ++c;