summaryrefslogtreecommitdiff
path: root/src/configreader.cpp
diff options
context:
space:
mode:
authorPeter Powell <petpow@saberuk.com>2017-09-11 15:38:26 +0100
committerPeter Powell <petpow@saberuk.com>2017-09-18 14:09:01 +0100
commitca9a56b7ac0ec2139ade835144369455baa757bc (patch)
tree85c22f30061f313ccba6c179667075ab347cc34e /src/configreader.cpp
parent60d92db9a1b71bbfd4230c5eb9f04cd6a87a41d8 (diff)
Convert Disabled[CU]Modes to use a bitset instead of a char array.
Diffstat (limited to 'src/configreader.cpp')
-rw-r--r--src/configreader.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/configreader.cpp b/src/configreader.cpp
index 005730dca..faf75dfcc 100644
--- a/src/configreader.cpp
+++ b/src/configreader.cpp
@@ -483,23 +483,23 @@ void ServerConfig::Fill()
ReadXLine(this, "badhost", "host", ServerInstance->XLines->GetFactory("K"));
ReadXLine(this, "exception", "host", ServerInstance->XLines->GetFactory("E"));
- memset(DisabledUModes, 0, sizeof(DisabledUModes));
+ DisabledUModes.reset();
std::string modes = ConfValue("disabled")->getString("usermodes");
for (std::string::const_iterator p = modes.begin(); p != modes.end(); ++p)
{
// Complain when the character is not a valid mode character.
if (!ModeParser::IsModeChar(*p))
throw CoreException("Invalid usermode " + std::string(1, *p) + " was found.");
- DisabledUModes[*p - 'A'] = 1;
+ DisabledUModes.set(*p - 'A');
}
- memset(DisabledCModes, 0, sizeof(DisabledCModes));
+ DisabledCModes.reset();
modes = ConfValue("disabled")->getString("chanmodes");
for (std::string::const_iterator p = modes.begin(); p != modes.end(); ++p)
{
if (!ModeParser::IsModeChar(*p))
throw CoreException("Invalid chanmode " + std::string(1, *p) + " was found.");
- DisabledCModes[*p - 'A'] = 1;
+ DisabledCModes.set(*p - 'A');
}
std::string v = security->getString("announceinvites");