251 cl.register_outgoing(conn, host_session); |
251 cl.register_outgoing(conn, host_session); |
252 |
252 |
253 local w = conn.write; |
253 local w = conn.write; |
254 host_session.sends2s = function (t) log("debug", "sending: %s", tostring(t)); w(tostring(t)); end |
254 host_session.sends2s = function (t) log("debug", "sending: %s", tostring(t)); w(tostring(t)); end |
255 |
255 |
256 conn.write(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)); |
256 conn.write(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' xml:lang='en'>]], from_host, to_host)); |
257 log("debug", "Connection attempt in progress..."); |
257 log("debug", "Connection attempt in progress..."); |
258 return true; |
258 return true; |
259 end |
259 end |
260 |
260 |
261 function streamopened(session, attr) |
261 function streamopened(session, attr) |