summaryrefslogtreecommitdiff
path: root/src/modules/m_ircv3_sts.cpp
diff options
context:
space:
mode:
authorPeter Powell <petpow@saberuk.com>2019-05-11 14:29:54 +0100
committerPeter Powell <petpow@saberuk.com>2019-05-11 14:34:42 +0100
commit31340d50a4053c681614583ecdd5e8c6ba373d69 (patch)
tree60e35de0e10c376799b195bfe89be39226e45fb4 /src/modules/m_ircv3_sts.cpp
parente48d068769b8f5cf9924687646e7dae194931f9b (diff)
Allow disabling a STS policy for users in specific connect classes.
Fixes #1634.
Diffstat (limited to 'src/modules/m_ircv3_sts.cpp')
-rw-r--r--src/modules/m_ircv3_sts.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/modules/m_ircv3_sts.cpp b/src/modules/m_ircv3_sts.cpp
index a8738b2ac..68f4c46c6 100644
--- a/src/modules/m_ircv3_sts.cpp
+++ b/src/modules/m_ircv3_sts.cpp
@@ -35,6 +35,10 @@ class STSCap : public Cap::Capability
if (GetProtocol(user) == Cap::CAP_LEGACY)
return false;
+ // Don't send the cap to clients in a class which has STS disabled.
+ if (user->GetClass()->config->getBool("usests", true))
+ return false;
+
// Plaintext listeners have their own policy.
SSLIOHook* sslhook = SSLIOHook::IsSSL(&user->eh);
if (!sslhook)