diff options
| author | 2021-05-08 17:50:24 +0100 | |
|---|---|---|
| committer | 2021-05-08 17:50:24 +0100 | |
| commit | 8933c4b9ff010851285e3f773da2982a746d2c0b (patch) | |
| tree | e33f196e26d568f15b93210d3e5de1bc81b64f13 /src/channels.cpp | |
| parent | Add ChannelManager::IsPrefix. (diff) | |
Switch Channel::ChanModes to use the channel mode map.
Diffstat (limited to 'src/channels.cpp')
| -rw-r--r-- | src/channels.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/channels.cpp b/src/channels.cpp index 6b885735c..d1e318b51 100644 --- a/src/channels.cpp +++ b/src/channels.cpp @@ -402,13 +402,11 @@ const char* Channel::ChanModes(bool showsecret) scratch.clear(); - /* This was still iterating up to 190, Channel::modes is only 64 elements -- Om */ - for(int n = 0; n < 64; n++) + for (const auto& [_, mh] : ServerInstance->Modes.GetModes(MODETYPE_CHANNEL)) { - ModeHandler* mh = ServerInstance->Modes.FindMode(n + 65, MODETYPE_CHANNEL); - if (mh && IsModeSet(mh)) + if (IsModeSet(mh)) { - scratch.push_back(n + 65); + scratch.push_back(mh->GetModeChar()); ParamModeBase* pm = mh->IsParameterMode(); if (!pm) |
