summaryrefslogtreecommitdiff
path: root/src/mode.cpp
diff options
context:
space:
mode:
authorAttila Molnar <attilamolnar@hush.com>2014-03-14 12:56:20 +0100
committerAttila Molnar <attilamolnar@hush.com>2014-03-14 12:56:20 +0100
commit146d85b5dea9ecb803a9a47c68b5489905634125 (patch)
treec8156a5db6cb0afaf5310a59d8c1a7c4ab6de838 /src/mode.cpp
parentdd94ac5e3c6485c294394cc18cbc4228510e7a47 (diff)
Add InspIRCd::GetChans(), remove ChannelCount()
Diffstat (limited to 'src/mode.cpp')
-rw-r--r--src/mode.cpp5
1 files changed, 4 insertions, 1 deletions
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;
}