summaryrefslogtreecommitdiff
path: root/src/mode.cpp
diff options
context:
space:
mode:
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;
}