Software /
code /
prosody
Comparison
plugins/mod_component.lua @ 5013:ab693eea0869
mod_admin_adhoc, mod_admin_telnet, mod_bosh, mod_c2s, mod_component, mod_pep, mod_presence, mod_roster, mod_s2s: Import core_post_stanza from the global prosody table.
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Thu, 26 Jul 2012 04:33:17 +0200 |
parent | 4993:5243b74a4cbb |
child | 5059:246ba539a5cd |
comparison
equal
deleted
inserted
replaced
5012:d59c842fe38e | 5013:ab693eea0869 |
---|---|
15 local st = require "util.stanza"; | 15 local st = require "util.stanza"; |
16 | 16 |
17 local jid_split = require "util.jid".split; | 17 local jid_split = require "util.jid".split; |
18 local new_xmpp_stream = require "util.xmppstream".new; | 18 local new_xmpp_stream = require "util.xmppstream".new; |
19 local uuid_gen = require "util.uuid".generate; | 19 local uuid_gen = require "util.uuid".generate; |
20 | |
21 local core_process_stanza = prosody.core_process_stanza; | |
20 | 22 |
21 | 23 |
22 local log = module._log; | 24 local log = module._log; |
23 | 25 |
24 local sessions = module:shared("sessions"); | 26 local sessions = module:shared("sessions"); |
167 function stream_callbacks.streamclosed(session) | 169 function stream_callbacks.streamclosed(session) |
168 session.log("debug", "Received </stream:stream>"); | 170 session.log("debug", "Received </stream:stream>"); |
169 session:close(); | 171 session:close(); |
170 end | 172 end |
171 | 173 |
172 local core_process_stanza = core_process_stanza; | |
173 | |
174 function stream_callbacks.handlestanza(session, stanza) | 174 function stream_callbacks.handlestanza(session, stanza) |
175 -- Namespaces are icky. | 175 -- Namespaces are icky. |
176 if not stanza.attr.xmlns and stanza.name == "handshake" then | 176 if not stanza.attr.xmlns and stanza.name == "handshake" then |
177 stanza.attr.xmlns = xmlns_component; | 177 stanza.attr.xmlns = xmlns_component; |
178 end | 178 end |