summaryrefslogtreecommitdiff
path: root/src/modules/extra
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-01-30 22:20:06 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-01-30 22:20:06 +0000
commit0fff50fdd786eb1a3ca0ab69cbaa73dac21f385d (patch)
tree9aa417a1143af240d448577e9cea39071505d8e1 /src/modules/extra
parentba405e61c71f2c2f45d5ea4ef34569c7ce6114b6 (diff)
Added new event into m_spanningtree, event id send_metadata, which allows arbitary posting of metadata outside of the netburst
see line 529 of m_ssl_gnutls for an example of how to use it. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@2990 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules/extra')
-rw-r--r--src/modules/extra/m_ssl_gnutls.cpp15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/modules/extra/m_ssl_gnutls.cpp b/src/modules/extra/m_ssl_gnutls.cpp
index f02606d18..0ea713d00 100644
--- a/src/modules/extra/m_ssl_gnutls.cpp
+++ b/src/modules/extra/m_ssl_gnutls.cpp
@@ -523,10 +523,23 @@ class ModuleSSLGnuTLS : public Module
log(DEBUG, "m_ssl_gnutls.so: Handshake completed");
// This will do for setting the ssl flag...it could be done earlier if it's needed. But this seems neater.
- Srv->FindDescriptor(session->fd)->Extend("ssl", "ON");
+ userrec* extendme = Srv->FindDescriptor(session->fd);
+ extendme->Extend("ssl", "ON");
+
+ // Tell whatever protocol module we're using that we need to inform other servers of this metadata NOW.
+ std::deque<std::string>* metadata = new std::deque<std::string>;
+ metadata->push_back(extendme->nick);
+ metadata->push_back("ssl");
+ metadata->push_back("ON");
+ Event* event = new Event((char*)metadata,(Module*)this,"send_metadata");
+ event->Send();
+ delete event;
+ delete metadata;
+ // Change the seesion state
session->status = ISSL_HANDSHAKEN;
+ // Finish writing, if any left
MakePollWrite(session);
return true;