- virtual void OnPostConnect(User* user)
- {
- // This occurs AFTER OnUserConnect so we can be sure the
- // protocol module has propagated the NICK message.
- if ((user->GetExt("ssl", dummy)) && (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(ServerInstance); // Trigger the event. We don't care what module picks it up.
- DELETE(event);
- DELETE(metadata);
-
- VerifyCertificate(&sessions[user->GetFd()], user);
- if (sessions[user->GetFd()].sess)
- user->WriteServ("NOTICE %s :*** You are connected using SSL cipher \"%s\"", user->nick, SSL_get_cipher(sessions[user->GetFd()].sess));
- }
- }
-
- void MakePollWrite(issl_session* session)
- {
- //OnRawSocketWrite(session->fd, NULL, 0);
- EventHandler* eh = ServerInstance->FindDescriptor(session->fd);
- if (eh)
- {
- ServerInstance->SE->WantWrite(eh);
- }
- }
-
- virtual void OnBufferFlushed(User* user)
- {
- if (user->GetExt("ssl"))
- {
- issl_session* session = &sessions[user->GetFd()];
- if (session && session->outbuf.size())
- OnRawSocketWrite(user->GetFd(), NULL, 0);
- }
- }
-