+function xmppserver.status(conn, status)
+ if status == "ssl-handshake-complete" then
+ local session = sessions[conn];
+ if session and session.direction == "outgoing" then
+ local format, to_host, from_host = string.format, session.to_host, session.from_host;
+ session.log("debug", "Sending stream header...");
+ session.sends2s(format([[<stream:stream xmlns='jabber:server' xmlns:db='jabber:server:dialback' xmlns:stream='http://etherx.jabber.org/streams' from='%s' to='%s' version='1.0'>]], from_host, to_host));
+ end
+ end
+end
+