Software /
code /
prosody
Comparison
core/stanza_router.lua @ 8676:39ab6a296419
stanza_router: Limit scope of deprecated warning function since it is not used anywhere else [luacheck]
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Fri, 23 Mar 2018 13:15:19 +0100 |
parent | 8347:c72db8047440 |
child | 9063:f2a5d8eb04b3 |
comparison
equal
deleted
inserted
replaced
8675:d3d74e923e4e | 8676:39ab6a296419 |
---|---|
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 | 19 |
20 local core_post_stanza, core_process_stanza, core_route_stanza; | 20 local core_post_stanza, core_process_stanza, core_route_stanza; |
21 | 21 |
22 function deprecated_warning(f) | 22 local function deprecated_warning(f) |
23 _G[f] = function(...) | 23 _G[f] = function(...) |
24 log("warn", "Using the global %s() is deprecated, use module:send() or prosody.%s(). %s", f, f, debug.traceback()); | 24 log("warn", "Using the global %s() is deprecated, use module:send() or prosody.%s(). %s", f, f, debug.traceback()); |
25 return prosody[f](...); | 25 return prosody[f](...); |
26 end | 26 end |
27 end | 27 end |