]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/extra/m_ssl_gnutls.cpp
Newly revamped ziplinks module, work of psychon.. resolves (a lot) of problems with...
[user/henk/code/inspircd.git] / src / modules / extra / m_ssl_gnutls.cpp
index 86e726189a5ca973925ac0450ec5987e1340e732..910ff4a2126df35760639b706a7b99efbcc04056 100644 (file)
@@ -920,6 +920,20 @@ class ModuleSSLGnuTLS : public Module
        void OnEvent(Event* ev)
        {
                GenericCapHandler(ev, "tls", "tls");
+               if (ev->GetEventID() == "cap_req")
+               {
+                       /* GenericCapHandler() Extends("tls") a user if it does
+                        * CAP REQ tls. Check if this was done.
+                        */
+                       CapData *data = (CapData *) ev->GetData();
+                       if (data->user->Shrink("tls"))
+                       {
+                               /* Not in our spec?!?! */
+                               data->user->io = this;
+                               OnRawSocketAccept(data->user->GetFd(), data->user->GetIPString(),
+                                               data->user->GetPort());
+                       }
+               }
        }
 
        void Prioritize()