summaryrefslogtreecommitdiff
path: root/src/modes.cpp
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2010-08-28 20:56:45 -0400
committerAdam <Adam@anope.org>2010-08-28 20:56:45 -0400
commite820e1af0d01011dbe9d91d2971cc3518f7f3d42 (patch)
tree9eb52cf891c4cd92ad08ad8d2f7c019780bc6223 /src/modes.cpp
parent26ba944d55fb4ee92dd5d7a3d2cfa869a8be151f (diff)
Properly store our clients internal channel status's and burst them if needed.
Also made Flag::HasFlag use test() instead of operator[] to catch errors, and fixed an out of bounds access to a Flags bitset causing crashes on some systems.
Diffstat (limited to 'src/modes.cpp')
-rw-r--r--src/modes.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/modes.cpp b/src/modes.cpp
index da9f22bef..d3f8ddb9f 100644
--- a/src/modes.cpp
+++ b/src/modes.cpp
@@ -28,9 +28,9 @@ std::map<ChannelModeName, ChannelMode *> ModeManager::ChannelModesByName;
/* Number of generic modes we support */
unsigned GenericChannelModes = 0, GenericUserModes = 0;
/* Default mlocked modes on */
-Flags<ChannelModeName> DefMLockOn;
+Flags<ChannelModeName, CMODE_END * 2> DefMLockOn;
/* Default mlocked modes off */
-Flags<ChannelModeName> DefMLockOff;
+Flags<ChannelModeName, CMODE_END * 2> DefMLockOff;
/* Map for default mlocked mode parameters */
std::map<ChannelModeName, Anope::string> DefMLockParams;
@@ -41,7 +41,7 @@ void SetDefaultMLock(ServerConfig *config)
DefMLockOn.ClearFlags();
DefMLockOff.ClearFlags();
DefMLockParams.clear();
- Flags<ChannelModeName> *ptr = NULL;
+ Flags<ChannelModeName, CMODE_END * 2> *ptr = NULL;
Anope::string modes, param;
spacesepstream sep(config->MLock);