diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-01-30 22:34:22 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-01-30 22:34:22 +0000 |
commit | a693c96c88482216f7c4a8de9d3439d706040391 (patch) | |
tree | 2bbd6cf1caababa4279e309f25f124a9343b5a37 /src | |
parent | 0fff50fdd786eb1a3ca0ab69cbaa73dac21f385d (diff) |
Moved metadata code into into OnGlobalConnect
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@2991 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src')
-rw-r--r-- | src/modules/extra/m_ssl_gnutls.cpp | 26 |
1 files changed, 17 insertions, 9 deletions
diff --git a/src/modules/extra/m_ssl_gnutls.cpp b/src/modules/extra/m_ssl_gnutls.cpp index 0ea713d00..c58db87bb 100644 --- a/src/modules/extra/m_ssl_gnutls.cpp +++ b/src/modules/extra/m_ssl_gnutls.cpp @@ -231,7 +231,7 @@ class ModuleSSLGnuTLS : public Module void Implements(char* List) { List[I_OnRawSocketAccept] = List[I_OnRawSocketClose] = List[I_OnRawSocketRead] = List[I_OnRawSocketWrite] = List[I_OnCleanup] = 1; - List[I_OnSyncUserMetaData] = List[I_OnDecodeMetaData] = List[I_OnUnloadModule] = List[I_OnRehash] = List[I_OnWhois] = 1; + List[I_OnSyncUserMetaData] = List[I_OnDecodeMetaData] = List[I_OnUnloadModule] = List[I_OnRehash] = List[I_OnWhois] = List[I_OnGlobalConnect] = 1; } virtual void OnRawSocketAccept(int fd, std::string ip, int localport) @@ -526,6 +526,22 @@ class ModuleSSLGnuTLS : public Module userrec* extendme = Srv->FindDescriptor(session->fd); extendme->Extend("ssl", "ON"); + // Change the seesion state + session->status = ISSL_HANDSHAKEN; + + // Finish writing, if any left + MakePollWrite(session); + + return true; + } + } + + virtual void OnGlobalConnect(userrec* user) + { + // This occurs AFTER OnUserConnect so we can be sure the + // protocol module has propogated the NICK message. + if ((user->GetExt("ssl")) && (IS_LOCAL(user))) + { // 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); @@ -535,14 +551,6 @@ class ModuleSSLGnuTLS : public Module event->Send(); delete event; delete metadata; - - // Change the seesion state - session->status = ISSL_HANDSHAKEN; - - // Finish writing, if any left - MakePollWrite(session); - - return true; } } |