diff options
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/s2s/mod_s2s.lua | 2 | ||||
-rw-r--r-- | plugins/s2s/s2sout.lib.lua | 8 |
2 files changed, 4 insertions, 6 deletions
diff --git a/plugins/s2s/mod_s2s.lua b/plugins/s2s/mod_s2s.lua index d1fdedb3..f601a8a2 100644 --- a/plugins/s2s/mod_s2s.lua +++ b/plugins/s2s/mod_s2s.lua @@ -192,7 +192,7 @@ function stream_callbacks.streamopened(session, attr) if session.secure and not session.cert_chain_status then check_cert_status(session); end send("<?xml version='1.0'?>"); - send(stanza.stanza("stream:stream", { xmlns='jabber:server', ["xmlns:db"]='jabber:server:dialback', + send(st.stanza("stream:stream", { xmlns='jabber:server', ["xmlns:db"]='jabber:server:dialback', ["xmlns:stream"]='http://etherx.jabber.org/streams', id=session.streamid, from=session.to_host, to=session.from_host, version=(session.version > 0 and "1.0" or nil) }):top_tag()); if session.version >= 1.0 then local features = st.stanza("stream:features"); diff --git a/plugins/s2s/s2sout.lib.lua b/plugins/s2s/s2sout.lib.lua index 2856a15c..808c7e74 100644 --- a/plugins/s2s/s2sout.lib.lua +++ b/plugins/s2s/s2sout.lib.lua @@ -8,18 +8,15 @@ --- Module containing all the logic for connecting to a remote server -local t_insert = table.insert; -local t_sort = table.sort; -local ipairs = ipairs; - local wrapclient = require "net.server".wrapclient; local initialize_filters = require "util.filters".initialize; local idna_to_ascii = require "util.encodings".idna.to_ascii; local add_task = require "util.timer".add_task; -local st = require "util.stanza"; local new_ip = require "util.ip".new_ip; local rfc3484_dest = require "util.rfc3484".destination; local socket = require "socket"; +local t_insert, t_sort, ipairs = table.insert, table.sort, ipairs; +local st = require "util.stanza"; local s2s_new_outgoing = require "core.s2smanager".new_outgoing; local s2s_destroy_session = require "core.s2smanager".destroy_session; @@ -30,6 +27,7 @@ local s2sout = {}; local s2s_listener; + function s2sout.set_listener(listener) s2s_listener = listener; end |