]> git.netwichtig.de Git - user/henk/code/inspircd.git/commitdiff
Allow disabling a STS policy for users in specific connect classes.
authorPeter Powell <petpow@saberuk.com>
Sat, 11 May 2019 13:29:54 +0000 (14:29 +0100)
committerPeter Powell <petpow@saberuk.com>
Sat, 11 May 2019 13:34:42 +0000 (14:34 +0100)
Fixes #1634.

docs/conf/inspircd.conf.example
src/modules/m_ircv3_sts.cpp

index 8091ec5dec89ccb5dc2d945427f87d554e761824..cfccf8ac003bd24980acc10beec6f7044303c2c3 100644 (file)
          # useident: Defines if users in this class MUST respond to a ident query or not.
          useident="no"
 
+         # usests: Whether a STS policy should be advertised to users in this class.
+         # This setting only has effect when the ircv3_sts module is loaded.
+         #usests="no"
+
          # webirc: Restricts usage of this class to the specified WebIRC gateway.
          # This setting only has effect when the cgiirc module is loaded.
          #webirc="name"
          # useident: Defines if users in this class must respond to a ident query or not.
          useident="no"
 
+         # usests: Whether a STS policy should be advertised to users in this class.
+         # This setting only has effect when the ircv3_sts module is loaded.
+         #usests="no"
+
          # limit: How many users are allowed in this class
          limit="5000"
 
index a8738b2ac0d718d0d2774bf423840c34b685053d..68f4c46c6d3a5621fe685613cfdd68dda9fe108b 100644 (file)
@@ -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)