mirror of
https://github.com/anope/anope.git
synced 2026-06-29 18:36:38 +02:00
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.
This commit is contained in:
+3
-3
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user