Software /
code /
prosody
Diff
plugins/mod_c2s.lua @ 6063:e626ee2fe106
mod_c2s, mod_s2s, mod_component, util.xmppstream: Move all session:open_stream() functions to util.xmppstream
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Thu, 10 Apr 2014 13:13:07 +0200 |
parent | 6005:98b768a41c9d |
child | 6284:b49540983320 |
line wrap: on
line diff
--- a/plugins/mod_c2s.lua Thu Apr 10 00:24:29 2014 +0200 +++ b/plugins/mod_c2s.lua Thu Apr 10 13:13:07 2014 +0200 @@ -174,19 +174,6 @@ end end -local function session_open_stream(session) - local attr = { - ["xmlns:stream"] = 'http://etherx.jabber.org/streams', - xmlns = stream_callbacks.default_ns, - version = "1.0", - ["xml:lang"] = 'en', - id = session.streamid or "", - from = session.host - }; - session.send("<?xml version='1.0'?>"); - session.send(st.stanza("stream:stream", attr):top_tag()); -end - module:hook_global("user-deleted", function(event) local username, host = event.username, event.host; local user = hosts[host].sessions[username]; @@ -234,7 +221,6 @@ conn:setoption("keepalive", opt_keepalives); end - session.open_stream = session_open_stream; session.close = session_close; local stream = new_xmpp_stream(session, stream_callbacks);