]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_sasl.cpp
Remove swhois messages set in the oper block on deoper.
[user/henk/code/inspircd.git] / src / modules / m_sasl.cpp
index 8ac43fba7319e6a03e1a1c09baa7bcd30034d4e2..0ef93ec5ae66476923dfe7eaded192dba54711df 100644 (file)
@@ -35,10 +35,6 @@ static void SendSASL(const parameterlist& params)
 {
        if (!ServerInstance->PI->SendEncapsulatedData(params))
        {
-               User* u = ServerInstance->FindUUID(params[2]);
-               if (u)
-                       u->WriteNumeric(904, "%s :SASL authentication failed", u->nick.c_str());
-
                SASLFallback(NULL, params);
        }
 }
@@ -103,6 +99,15 @@ class SaslAuthenticator
                params.push_back(host);
                params.push_back(ip);
 
+               LocalUser* lu = IS_LOCAL(user);
+               if (lu)
+               {
+                       // NOTE: SaslAuthenticator instances are only created for local
+                       // users so this parameter will always be appended.
+                       SocketCertificateRequest req(&lu->eh, ServerInstance->Modules->Find("m_sasl.so"));
+                       params.push_back(req.cert ? "S" : "P");
+               }
+
                SendSASL(params);
        }