stream << "# This file is automatically generated by m_permchannels. Any changes will be overwritten." << std::endl
<< "<config format=\"xml\">" << std::endl;
- for (chan_hash::const_iterator i = ServerInstance->chanlist->begin(); i != ServerInstance->chanlist->end(); i++)
+ const chan_hash& chans = ServerInstance->GetChans();
+ for (chan_hash::const_iterator i = chans.begin(); i != chans.end(); ++i)
{
Channel* chan = i->second;
if (!chan->IsModeSet(permchanmode))