diff options
Diffstat (limited to 'src/modules/m_namedmodes.cpp')
-rw-r--r-- | src/modules/m_namedmodes.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/modules/m_namedmodes.cpp b/src/modules/m_namedmodes.cpp index e8b90caa3..5c0ffeea5 100644 --- a/src/modules/m_namedmodes.cpp +++ b/src/modules/m_namedmodes.cpp @@ -22,11 +22,10 @@ static void DisplayList(User* user, Channel* channel) { std::stringstream items; - for(char letter = 'A'; letter <= 'z'; letter++) + const ModeParser::ModeHandlerMap& mhs = ServerInstance->Modes->GetModes(MODETYPE_CHANNEL); + for (ModeParser::ModeHandlerMap::const_iterator i = mhs.begin(); i != mhs.end(); ++i) { - ModeHandler* mh = ServerInstance->Modes->FindMode(letter, MODETYPE_CHANNEL); - if (!mh || mh->IsListMode()) - continue; + ModeHandler* mh = i->second; if (!channel->IsModeSet(mh)) continue; items << " +" << mh->name; |