14 local jid_split = require "util.jid".split; |
14 local jid_split = require "util.jid".split; |
15 local jid_prepped_split = require "util.jid".prepped_split; |
15 local jid_prepped_split = require "util.jid".prepped_split; |
16 |
16 |
17 local full_sessions = _G.prosody.full_sessions; |
17 local full_sessions = _G.prosody.full_sessions; |
18 local bare_sessions = _G.prosody.bare_sessions; |
18 local bare_sessions = _G.prosody.bare_sessions; |
|
19 |
|
20 local core_post_stanza, core_process_stanza, core_route_stanza; |
|
21 |
|
22 function deprecated_warning(f) |
|
23 _G[f] = function(...) |
|
24 log("warn", "Using the global %s() is deprecated, use module:send() or prosody.%s(). %s", f, f, debug.traceback()); |
|
25 return prosody[f](...); |
|
26 end |
|
27 end |
|
28 deprecated_warning"core_post_stanza"; |
|
29 deprecated_warning"core_process_stanza"; |
|
30 deprecated_warning"core_route_stanza"; |
19 |
31 |
20 local function handle_unhandled_stanza(host, origin, stanza) |
32 local function handle_unhandled_stanza(host, origin, stanza) |
21 local name, xmlns, origin_type = stanza.name, stanza.attr.xmlns or "jabber:client", origin.type; |
33 local name, xmlns, origin_type = stanza.name, stanza.attr.xmlns or "jabber:client", origin.type; |
22 if name == "iq" and xmlns == "jabber:client" then |
34 if name == "iq" and xmlns == "jabber:client" then |
23 if stanza.attr.type == "get" or stanza.attr.type == "set" then |
35 if stanza.attr.type == "get" or stanza.attr.type == "set" then |