aboutsummaryrefslogtreecommitdiff
path: root/src/modules
diff options
context:
space:
mode:
authorGravatar Sadie Powell2022-09-30 20:21:59 +0100
committerGravatar Sadie Powell2022-09-30 20:21:59 +0100
commite4efd41a99e1237b61336555af0398ef5f634a4d (patch)
tree33d556a2347e0e1531546cf0d661b40512c3b620 /src/modules
parentUse auto instead of type names where the type is obvious. (diff)
Use a global typedef for representing a character set.
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/m_anticaps.cpp4
-rw-r--r--src/modules/m_channames.cpp2
-rw-r--r--src/modules/m_chghost.cpp2
-rw-r--r--src/modules/m_codepage.cpp6
-rw-r--r--src/modules/m_dnsbl.cpp2
-rw-r--r--src/modules/m_hostchange.cpp2
-rw-r--r--src/modules/m_sethost.cpp2
7 files changed, 9 insertions, 11 deletions
diff --git a/src/modules/m_anticaps.cpp b/src/modules/m_anticaps.cpp
index beb29f2ec..8037a058a 100644
--- a/src/modules/m_anticaps.cpp
+++ b/src/modules/m_anticaps.cpp
@@ -160,8 +160,8 @@ class ModuleAntiCaps final
private:
ChanModeReference banmode;
CheckExemption::EventProvider exemptionprov;
- std::bitset<UCHAR_MAX + 1> uppercase;
- std::bitset<UCHAR_MAX + 1> lowercase;
+ CharState uppercase;
+ CharState lowercase;
AntiCapsMode mode;
void CreateBan(Channel* channel, User* user, bool mute)
diff --git a/src/modules/m_channames.cpp b/src/modules/m_channames.cpp
index 650017b26..91806b1d0 100644
--- a/src/modules/m_channames.cpp
+++ b/src/modules/m_channames.cpp
@@ -24,7 +24,7 @@
#include "inspircd.h"
-static std::bitset<UCHAR_MAX + 1> allowedmap;
+static CharState allowedmap;
class NewIsChannelHandler final
{
diff --git a/src/modules/m_chghost.cpp b/src/modules/m_chghost.cpp
index 0cb65bf6e..e97526172 100644
--- a/src/modules/m_chghost.cpp
+++ b/src/modules/m_chghost.cpp
@@ -30,7 +30,7 @@ class CommandChghost final
: public Command
{
public:
- std::bitset<UCHAR_MAX + 1> hostmap;
+ CharState hostmap;
CommandChghost(Module* Creator)
: Command(Creator,"CHGHOST", 2)
diff --git a/src/modules/m_codepage.cpp b/src/modules/m_codepage.cpp
index e6ff7a919..350ec617c 100644
--- a/src/modules/m_codepage.cpp
+++ b/src/modules/m_codepage.cpp
@@ -88,13 +88,11 @@ class SingleByteCodepage final
: public Codepage
{
private:
- typedef std::bitset<UCHAR_MAX + 1> AllowedChars;
-
// The characters which are allowed in nicknames.
- AllowedChars allowedchars;
+ CharState allowedchars;
// The characters which are allowed at the front of a nickname.
- AllowedChars allowedfrontchars;
+ CharState allowedfrontchars;
public:
AllowCharacterResult AllowCharacter(uint32_t character, bool front) override
diff --git a/src/modules/m_dnsbl.cpp b/src/modules/m_dnsbl.cpp
index d100daebb..bedfaec0a 100644
--- a/src/modules/m_dnsbl.cpp
+++ b/src/modules/m_dnsbl.cpp
@@ -86,7 +86,7 @@ public:
std::string name;
// A range of DNSBL result types to match against.
- std::bitset<UCHAR_MAX + 1> records;
+ CharState records;
// The message to send to users who's IP address is in a DNSBL.
std::string reason;
diff --git a/src/modules/m_hostchange.cpp b/src/modules/m_hostchange.cpp
index 00a665b17..d6d79286c 100644
--- a/src/modules/m_hostchange.cpp
+++ b/src/modules/m_hostchange.cpp
@@ -127,7 +127,7 @@ class ModuleHostChange final
{
private:
Account::API accountapi;
- std::bitset<UCHAR_MAX + 1> hostmap;
+ CharState 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 dac4fdae7..769f51cb5 100644
--- a/src/modules/m_sethost.cpp
+++ b/src/modules/m_sethost.cpp
@@ -29,7 +29,7 @@ class CommandSethost final
: public Command
{
public:
- std::bitset<UCHAR_MAX + 1> hostmap;
+ CharState hostmap;
CommandSethost(Module* Creator)
: Command(Creator,"SETHOST", 1)