From 093b3d258e7b14d2aa057ca6113de034b5063efe Mon Sep 17 00:00:00 2001 From: Adam Date: Sun, 6 Mar 2011 19:36:52 -0500 Subject: Change the mode name code to use Flags names in preparation for extban support --- modules/core/cs_mode.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'modules/core/cs_mode.cpp') diff --git a/modules/core/cs_mode.cpp b/modules/core/cs_mode.cpp index 6399bdc35..4d3705845 100644 --- a/modules/core/cs_mode.cpp +++ b/modules/core/cs_mode.cpp @@ -164,16 +164,13 @@ class CommandCSMode : public Command case '*': if (adding == -1) break; - for (std::map::const_iterator it = ModeManager::Modes.begin(), it_end = ModeManager::Modes.end(); it != it_end; ++it) + for (unsigned j = 0; j < ModeManager::ChannelModes.size(); ++j) { - Mode *m = it->second; - if (m->Class == MC_CHANNEL) + ChannelMode *cm = ModeManager::ChannelModes[j]; + if (cm->CanSet(u)) { - ChannelMode *cm = debug_cast(m); if (cm->Type == MODE_REGULAR || (!adding && cm->Type == MODE_PARAM)) { - if (!cm->CanSet(u)) - continue; if (adding) ci->c->SetMode(NULL, cm); else -- cgit