summaryrefslogtreecommitdiff
path: root/modules/commands/cs_mode.cpp
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2013-02-13 19:28:45 -0500
committerAdam <Adam@anope.org>2013-02-14 01:20:18 -0500
commit5cf1edeb6efe6277f5674e0647f2c9c091346ddc (patch)
tree14ef411c0205620f8a7fb1db4e74c01c1b0129cd /modules/commands/cs_mode.cpp
parent9e544a6443117861c3d6406e435043f1cf0f7099 (diff)
Fix CommandCSMode::CanSet letting everyone set voice
Diffstat (limited to 'modules/commands/cs_mode.cpp')
-rw-r--r--modules/commands/cs_mode.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/modules/commands/cs_mode.cpp b/modules/commands/cs_mode.cpp
index 5a6a51d4e..8c2845178 100644
--- a/modules/commands/cs_mode.cpp
+++ b/modules/commands/cs_mode.cpp
@@ -25,7 +25,7 @@ class CommandCSMode : public Command
const Anope::string modes[] = { "VOICE", "HALFOP", "OP", "PROTECT", "OWNER" };
ChannelModeStatus *cms = anope_dynamic_static_cast<ChannelModeStatus *>(cm);
AccessGroup access = source.AccessFor(ci);
- unsigned short u_level = 0;
+ short u_level = -1;
for (int i = 0; !accesses[i].empty(); ++i)
if (access.HasPriv(self ? accesses_self[i] : accesses[i]))
@@ -34,11 +34,11 @@ class CommandCSMode : public Command
if (cm2 == NULL || cm2->type != MODE_STATUS)
continue;
ChannelModeStatus *cms2 = anope_dynamic_static_cast<ChannelModeStatus *>(cm2);
- if (cms2->Level > u_level)
- u_level = cms2->Level;
+ if (cms2->level > u_level)
+ u_level = cms2->level;
}
- return u_level >= cms->Level;
+ return u_level >= cms->level;
}
void DoLock(CommandSource &source, ChannelInfo *ci, const std::vector<Anope::string> &params)