diff options
author | om <om@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-01-31 00:11:23 +0000 |
---|---|---|
committer | om <om@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-01-31 00:11:23 +0000 |
commit | 94d1d02c4c43ad3a77529cfef15a18a576a4d0f2 (patch) | |
tree | 5090c1904fffff658bdc43b3312895fd2b33248b /src/modules/extra | |
parent | ee37ec258aeaff7086d75682ea3b75da480cea75 (diff) |
Some changes to some stuff..
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@2996 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules/extra')
-rw-r--r-- | src/modules/extra/m_ssl_openssl.cpp | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/src/modules/extra/m_ssl_openssl.cpp b/src/modules/extra/m_ssl_openssl.cpp index 28123eb56..9b0e52a7b 100644 --- a/src/modules/extra/m_ssl_openssl.cpp +++ b/src/modules/extra/m_ssl_openssl.cpp @@ -254,7 +254,7 @@ class ModuleSSLOpenSSL : 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) @@ -608,6 +608,24 @@ class ModuleSSLOpenSSL : public Module } } + 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(user->nick); + metadata->push_back("ssl"); // The metadata id + metadata->push_back("ON"); // The value to send + Event* event = new Event((char*)metadata,(Module*)this,"send_metadata"); + event->Send(); // Trigger the event. We don't care what module picks it up. + delete event; + delete metadata; + } + } + void MakePollWrite(issl_session* session) { OnRawSocketWrite(session->fd, NULL, 0); |