Software /
code /
prosody
Changeset
7723:488fddf88ffd
Merge 0.10->trunk
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sat, 19 Nov 2016 01:05:36 +0100 |
parents | 7719:17c7e3ac47f7 (current diff) 7722:82333dfdfaff (diff) |
children | 7724:20a69ef5570c |
files | plugins/mod_admin_telnet.lua util/dependencies.lua |
diffstat | 3 files changed, 5 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/plugins/mod_admin_telnet.lua Thu Nov 17 23:20:41 2016 +0100 +++ b/plugins/mod_admin_telnet.lua Sat Nov 19 01:05:36 2016 +0100 @@ -32,7 +32,6 @@ local commands = module:shared("commands") local def_env = module:shared("env"); local default_env_mt = { __index = def_env }; -local core_post_stanza = prosody.core_post_stanza; local function redirect_output(_G, session) local env = setmetatable({ print = session.print }, { __index = function (t, k) return rawget(_G, k); end }); @@ -1099,9 +1098,8 @@ local st = require "util.stanza"; function def_env.xmpp:ping(localhost, remotehost) if hosts[localhost] then - core_post_stanza(hosts[localhost], - st.iq{ from=localhost, to=remotehost, type="get", id="ping" } - :tag("ping", {xmlns="urn:xmpp:ping"})); + module:send(st.iq{ from=localhost, to=remotehost, type="get", id="ping" } + :tag("ping", {xmlns="urn:xmpp:ping"}), hosts[localhost]); return true, "Sent ping"; else return nil, "No such host";
--- a/util/dependencies.lua Thu Nov 17 23:20:41 2016 +0100 +++ b/util/dependencies.lua Sat Nov 19 01:05:36 2016 +0100 @@ -136,7 +136,7 @@ end local function log_warnings() - if _VERSION > "Lua 5.1" then + if _VERSION > "Lua 5.2" then prosody.log("warn", "Support for %s is experimental, please report any issues", _VERSION); end local ssl = softreq"ssl";
--- a/util/helpers.lua Thu Nov 17 23:20:41 2016 +0100 +++ b/util/helpers.lua Sat Nov 19 01:05:36 2016 +0100 @@ -43,14 +43,14 @@ local event_handlers = events._handlers; local events_array = {}; local event_handler_arrays = {}; - for event in pairs(events._event_map) do + for event, priorities in pairs(events._event_map) do local handlers = event_handlers[event]; if handlers and (event == specific_event or not specific_event) then table.insert(events_array, event); local handler_strings = {}; for i, handler in ipairs(handlers) do local upvals = debug.string_from_var_table(debug.get_upvalues_table(handler)); - handler_strings[i] = " "..i..": "..tostring(handler)..(upvals and ("\n "..upvals) or ""); + handler_strings[i] = " "..priorities[handler]..": "..tostring(handler)..(upvals and ("\n "..upvals) or ""); end event_handler_arrays[event] = handler_strings; end