mirror of
https://github.com/anope/anope.git
synced 2026-07-03 13:03:14 +02:00
Fix ModeManager::RebuildStatusModes, not all modes are in GetChannelModes() at the time this is called
This commit is contained in:
+3
-3
@@ -587,11 +587,11 @@ static struct StatusSort
|
||||
void ModeManager::RebuildStatusModes()
|
||||
{
|
||||
ChannelModesByStatus.clear();
|
||||
for (unsigned j = 0; j < ModeManager::GetChannelModes().size(); ++j)
|
||||
for (unsigned j = 0; j < ChannelModesIdx.size(); ++j)
|
||||
{
|
||||
ChannelMode *cm = ModeManager::GetChannelModes()[j];
|
||||
ChannelMode *cm = ChannelModesIdx[j];
|
||||
|
||||
if (cm->type == MODE_STATUS && std::find(ChannelModesByStatus.begin(), ChannelModesByStatus.end(), cm) == ChannelModesByStatus.end())
|
||||
if (cm && cm->type == MODE_STATUS && std::find(ChannelModesByStatus.begin(), ChannelModesByStatus.end(), cm) == ChannelModesByStatus.end())
|
||||
ChannelModesByStatus.push_back(anope_dynamic_static_cast<ChannelModeStatus *>(cm));
|
||||
}
|
||||
std::sort(ChannelModesByStatus.begin(), ChannelModesByStatus.end(), statuscmp);
|
||||
|
||||
Reference in New Issue
Block a user