From 146d85b5dea9ecb803a9a47c68b5489905634125 Mon Sep 17 00:00:00 2001 From: Attila Molnar Date: Fri, 14 Mar 2014 12:56:20 +0100 Subject: Add InspIRCd::GetChans(), remove ChannelCount() --- src/mode.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/mode.cpp') diff --git a/src/mode.cpp b/src/mode.cpp index 1a02b5ec7..ee6b1cae5 100644 --- a/src/mode.cpp +++ b/src/mode.cpp @@ -701,7 +701,9 @@ bool ModeParser::DelMode(ModeHandler* mh) } break; case MODETYPE_CHANNEL: - for (chan_hash::iterator i = ServerInstance->chanlist->begin(); i != ServerInstance->chanlist->end(); ) + { + const chan_hash& chans = ServerInstance->GetChans(); + for (chan_hash::const_iterator i = chans.begin(); i != chans.end(); ) { // The channel may not be in the hash after RemoveMode(), see m_permchannels Channel* chan = i->second; @@ -718,6 +720,7 @@ bool ModeParser::DelMode(ModeHandler* mh) stackresult.erase(stackresult.begin() + 1, stackresult.end()); } } + } break; } -- cgit v1.3.1-10-gc9f91