diff options
| author | 2020-04-09 18:57:50 +0100 | |
|---|---|---|
| committer | 2020-04-11 13:54:05 +0100 | |
| commit | 1a800f7b3db23cdef7e167cd25c0f3b2a64a8e46 (patch) | |
| tree | f302e819c6707d578c2011544069a21640fab735 /src/modules/m_cloaking.cpp | |
| parent | Default <sslprofile:hash> to sha256 for GnuTLS and OpenSSL. (diff) | |
Improve storage of module description, flags, and link data.
Diffstat (limited to 'src/modules/m_cloaking.cpp')
| -rw-r--r-- | src/modules/m_cloaking.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/modules/m_cloaking.cpp b/src/modules/m_cloaking.cpp index 406ab410b..f6f969f22 100644 --- a/src/modules/m_cloaking.cpp +++ b/src/modules/m_cloaking.cpp @@ -190,7 +190,8 @@ class ModuleCloaking : public Module dynamic_reference<HashProvider> Hash; ModuleCloaking() - : cu(this) + : Module(VF_VENDOR | VF_COMMON, "Provides masking of user hostnames") + , cu(this) , ck(this) , Hash(this, "hash/md5") { @@ -390,9 +391,9 @@ class ModuleCloaking : public Module cu.active = false; } - Version GetVersion() override + void GetLinkData(std::string& data) override { - std::string testcloak = "broken"; + data = "broken"; if (Hash && !cloaks.empty()) { const CloakInfo& info = cloaks.front(); @@ -402,18 +403,17 @@ class ModuleCloaking : public Module // Use old cloaking verification to stay compatible with 2.0 // But verify domainparts and ignorecase when use 3.0-only features if (info.domainparts == 3 && !info.ignorecase) - testcloak = info.prefix + SegmentCloak(info, "*", 3, 8) + info.suffix; + data = info.prefix + SegmentCloak(info, "*", 3, 8) + info.suffix; else { irc::sockets::sockaddrs sa; - testcloak = GenCloak(info, sa, "", testcloak + ConvToStr(info.domainparts)) + (info.ignorecase ? "-ci" : ""); + data = GenCloak(info, sa, "", data + ConvToStr(info.domainparts)) + (info.ignorecase ? "-ci" : ""); } break; case MODE_OPAQUE: - testcloak = info.prefix + SegmentCloak(info, "*", 4, 8) + info.suffix + (info.ignorecase ? "-ci" : ""); + data = info.prefix + SegmentCloak(info, "*", 4, 8) + info.suffix + (info.ignorecase ? "-ci" : ""); } } - return Version("Provides masking of user hostnames", VF_COMMON|VF_VENDOR, testcloak); } void ReadConfig(ConfigStatus& status) override |
