summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/modules/who.h6
-rw-r--r--src/coremods/core_who.cpp2
-rw-r--r--src/modules/m_anticaps.cpp4
-rw-r--r--src/modules/m_blockcaps.cpp4
-rw-r--r--src/modules/m_chghost.cpp2
-rw-r--r--src/modules/m_hostchange.cpp2
-rw-r--r--src/modules/m_sethost.cpp2
7 files changed, 12 insertions, 10 deletions
diff --git a/include/modules/who.h b/include/modules/who.h
index 36aecbc03..d5fcba977 100644
--- a/include/modules/who.h
+++ b/include/modules/who.h
@@ -51,8 +51,10 @@ class Who::EventListener : public Events::ModuleEventListener
class Who::Request
{
public:
+ typedef std::bitset<UCHAR_MAX + 1> CharState;
+
/** The flags for matching users to include. */
- std::bitset<UCHAR_MAX> flags;
+ CharState flags;
/** Whether we are matching using a wildcard or a flag. */
bool fuzzy_match;
@@ -67,7 +69,7 @@ class Who::Request
bool whox;
/** The fields to include in the WHOX response. */
- std::bitset<UCHAR_MAX> whox_fields;
+ CharState whox_fields;
/** A user specified label for the WHOX response. */
std::string whox_querytype;
diff --git a/src/coremods/core_who.cpp b/src/coremods/core_who.cpp
index aa19efe97..b853ef4b1 100644
--- a/src/coremods/core_who.cpp
+++ b/src/coremods/core_who.cpp
@@ -80,7 +80,7 @@ struct WhoData : public Who::Request
// If flags have been specified by the source.
if (parameters.size() > 1)
{
- std::bitset<UCHAR_MAX>* current_bitset = &flags;
+ CharState* current_bitset = &flags;
for (std::string::const_iterator iter = parameters[1].begin(); iter != parameters[1].end(); ++iter)
{
unsigned char chr = static_cast<unsigned char>(*iter);
diff --git a/src/modules/m_anticaps.cpp b/src/modules/m_anticaps.cpp
index 2c39dce98..8b6cd50f5 100644
--- a/src/modules/m_anticaps.cpp
+++ b/src/modules/m_anticaps.cpp
@@ -158,8 +158,8 @@ class ModuleAntiCaps : public Module
{
private:
CheckExemption::EventProvider exemptionprov;
- std::bitset<UCHAR_MAX> uppercase;
- std::bitset<UCHAR_MAX> lowercase;
+ std::bitset<UCHAR_MAX + 1> uppercase;
+ std::bitset<UCHAR_MAX + 1> lowercase;
AntiCapsMode mode;
void CreateBan(Channel* channel, User* user, bool mute)
diff --git a/src/modules/m_blockcaps.cpp b/src/modules/m_blockcaps.cpp
index 3bf9c98d0..c79ff15f5 100644
--- a/src/modules/m_blockcaps.cpp
+++ b/src/modules/m_blockcaps.cpp
@@ -34,8 +34,8 @@ class ModuleBlockCAPS : public Module
SimpleChannelModeHandler bc;
unsigned int percent;
unsigned int minlen;
- std::bitset<UCHAR_MAX> lowercase;
- std::bitset<UCHAR_MAX> uppercase;
+ std::bitset<UCHAR_MAX + 1> lowercase;
+ std::bitset<UCHAR_MAX + 1> uppercase;
public:
ModuleBlockCAPS()
diff --git a/src/modules/m_chghost.cpp b/src/modules/m_chghost.cpp
index d8f306699..45709fa44 100644
--- a/src/modules/m_chghost.cpp
+++ b/src/modules/m_chghost.cpp
@@ -30,7 +30,7 @@
class CommandChghost : public Command
{
public:
- std::bitset<UCHAR_MAX> hostmap;
+ std::bitset<UCHAR_MAX + 1> hostmap;
CommandChghost(Module* Creator)
: Command(Creator,"CHGHOST", 2)
diff --git a/src/modules/m_hostchange.cpp b/src/modules/m_hostchange.cpp
index 47c831d29..56ea337fd 100644
--- a/src/modules/m_hostchange.cpp
+++ b/src/modules/m_hostchange.cpp
@@ -106,7 +106,7 @@ typedef std::vector<HostRule> HostRules;
class ModuleHostChange : public Module
{
private:
- std::bitset<UCHAR_MAX> hostmap;
+ std::bitset<UCHAR_MAX + 1> hostmap;
HostRules hostrules;
std::string CleanName(const std::string& name)
diff --git a/src/modules/m_sethost.cpp b/src/modules/m_sethost.cpp
index 98067b459..18c964d1b 100644
--- a/src/modules/m_sethost.cpp
+++ b/src/modules/m_sethost.cpp
@@ -30,7 +30,7 @@
class CommandSethost : public Command
{
public:
- std::bitset<UCHAR_MAX> hostmap;
+ std::bitset<UCHAR_MAX + 1> hostmap;
CommandSethost(Module* Creator)
: Command(Creator,"SETHOST", 1)