summaryrefslogtreecommitdiff
path: root/modules/core/cs_mode.cpp
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2011-03-06 19:36:52 -0500
committerAdam <Adam@anope.org>2011-03-06 19:36:52 -0500
commit093b3d258e7b14d2aa057ca6113de034b5063efe (patch)
tree3c169ecf5f2a8b299df32072834e040cf1d0966b /modules/core/cs_mode.cpp
parent48e6221cf0f2592b85ef220876435b966b6a49ed (diff)
Change the mode name code to use Flags names in preparation for extban support
Diffstat (limited to 'modules/core/cs_mode.cpp')
-rw-r--r--modules/core/cs_mode.cpp9
1 files changed, 3 insertions, 6 deletions
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<Anope::string, Mode *>::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<ChannelMode *>(m);
if (cm->Type == MODE_REGULAR || (!adding && cm->Type == MODE_PARAM))
{
- if (!cm->CanSet(u))
- continue;
if (adding)
ci->c->SetMode(NULL, cm);
else