diff options
| author | 2008-08-28 15:34:22 +0000 | |
|---|---|---|
| committer | 2008-08-28 15:34:22 +0000 | |
| commit | ee790f2cb4542dfed081e4a7d6fa61cc458b7108 (patch) | |
| tree | b27a8615848e8fd3e81facce9224fafde85339a3 /src/modules | |
| parent | Fix recursion crash (diff) | |
| download | inspircd++-ee790f2cb4542dfed081e4a7d6fa61cc458b7108.tar.gz inspircd++-ee790f2cb4542dfed081e4a7d6fa61cc458b7108.tar.bz2 inspircd++-ee790f2cb4542dfed081e4a7d6fa61cc458b7108.zip | |
Add CAP REQ tls support, thanks to psychon
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10332 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules')
| -rw-r--r-- | src/modules/extra/m_ssl_gnutls.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/modules/extra/m_ssl_gnutls.cpp b/src/modules/extra/m_ssl_gnutls.cpp index 86e726189..63d3d1a2d 100644 --- a/src/modules/extra/m_ssl_gnutls.cpp +++ b/src/modules/extra/m_ssl_gnutls.cpp @@ -920,6 +920,19 @@ 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")) + { + data->user->io = this; + OnRawSocketAccept(data->user->GetFd(), data->user->GetIPString(), + data->user->GetPort()); + } + } } void Prioritize() |
