aboutsummaryrefslogtreecommitdiff
path: root/src/modules/m_cloak_user.cpp
diff options
context:
space:
mode:
authorGravatar Sadie Powell2023-06-20 18:11:59 +0100
committerGravatar Sadie Powell2023-06-20 18:11:59 +0100
commit5d706e3d0164776194f74b4473446d9e77340d60 (patch)
tree5a12077655c32cd44dd6e5f1268cca3b98ad88d5 /src/modules/m_cloak_user.cpp
parentUpdate the description of the cloak_user module. (diff)
Misc cleanup of cloak_user.
Diffstat (limited to 'src/modules/m_cloak_user.cpp')
-rw-r--r--src/modules/m_cloak_user.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/modules/m_cloak_user.cpp b/src/modules/m_cloak_user.cpp
index f0a4801a1..369950df2 100644
--- a/src/modules/m_cloak_user.cpp
+++ b/src/modules/m_cloak_user.cpp
@@ -23,7 +23,7 @@
class UserMethod
: public Cloak::Method
{
-protected:
+private:
// The characters which are valid in a hostname.
const CharState& hostmap;
@@ -36,6 +36,10 @@ protected:
// The suffix for IP cloaks (e.g. .example.org).
const std::string suffix;
+ // Retrieves the middle segment of the cloak.
+ virtual std::string GetMiddle(LocalUser* user) = 0;
+
+protected:
UserMethod(const Cloak::Engine* engine, const std::shared_ptr<ConfigTag>& tag, const CharState& hm) ATTR_NOT_NULL(2)
: Cloak::Method(engine, tag)
, hostmap(hm)
@@ -45,9 +49,6 @@ protected:
{
}
- // Retrieves the middle segment of the cloak.
- virtual std::string GetMiddle(LocalUser* user) = 0;
-
public:
std::string Generate(LocalUser* user) override ATTR_NOT_NULL(2)
{
@@ -81,7 +82,7 @@ public:
std::string Generate(const std::string& hostip) override
{
- // We can't generate account cloaks without a user.
+ // We can't generate user cloaks without a user.
return {};
}