Comparison

plugins/mod_c2s.lua @ 6847:c314e9142e9d

Merge 0.10->trunk
author Kim Alvefur <zash@zash.se>
date Thu, 24 Sep 2015 20:15:19 +0200
parent 6846:7eb166fa1f26
child 7101:f83211f4d776
comparison
equal deleted inserted replaced
6843:161cccfdf015 6847:c314e9142e9d
81 end 81 end
82 end 82 end
83 83
84 local features = st.stanza("stream:features"); 84 local features = st.stanza("stream:features");
85 hosts[session.host].events.fire_event("stream-features", { origin = session, features = features }); 85 hosts[session.host].events.fire_event("stream-features", { origin = session, features = features });
86 send(features); 86 if features.tags[1] or session.full_jid then
87 send(features);
88 else
89 (session.log or log)("warn", "No features to offer");
90 session:close{ condition = "undefined-condition", text = "No features to proceed with" };
91 end
87 end 92 end
88 93
89 function stream_callbacks.streamclosed(session) 94 function stream_callbacks.streamclosed(session)
90 session.log("debug", "Received </stream:stream>"); 95 session.log("debug", "Received </stream:stream>");
91 session:close(false); 96 session:close(false);