]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_ircv3_sts.cpp
Fix some regressions in sending tags between servers.
[user/henk/code/inspircd.git] / src / modules / m_ircv3_sts.cpp
index cbfdd1307dc7c0f4251bb52314abfd38389d50b6..cab671b70c5ae00830b3a5c4099fb386e25eee8d 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)
@@ -130,7 +134,7 @@ class ModuleIRCv3STS : public Module
                for (std::vector<ListenSocket*>::const_iterator iter = ServerInstance->ports.begin(); iter != ServerInstance->ports.end(); ++iter)
                {
                        ListenSocket* ls = *iter;
-                       
+
                        // Is this listener on the right port?
                        unsigned int saport = ls->bind_sa.port();
                        if (saport != port)