diff options
Diffstat (limited to 'modules/commands/cs_mode.cpp')
-rw-r--r-- | modules/commands/cs_mode.cpp | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/modules/commands/cs_mode.cpp b/modules/commands/cs_mode.cpp index 7f22d1e26..d5c356fa4 100644 --- a/modules/commands/cs_mode.cpp +++ b/modules/commands/cs_mode.cpp @@ -615,15 +615,10 @@ class CommandCSMode : public Command } else { - std::pair<Channel::ModeList::iterator, Channel::ModeList::iterator> its = ci->c->GetModeList(cm->name); - for (; its.first != its.second;) - { - const Anope::string &mask = its.first->second; - ++its.first; - - if (Anope::Match(mask, param)) - ci->c->RemoveMode(NULL, cm, mask); - } + std::vector<Anope::string> v = ci->c->GetModeList(cm->name); + for (unsigned j = 0; j < v.size(); ++j) + if (Anope::Match(v[j], param)) + ci->c->RemoveMode(NULL, cm, v[j]); } } } |