aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2016-11-19 01:05:36 +0100
committerKim Alvefur <zash@zash.se>2016-11-19 01:05:36 +0100
commitd8aafa0efe7e6106b663c4f76b4e8cde33fe8944 (patch)
tree10c5a2294941641099a92c40f24081bcf121cd8f
parentfd894fe73e9890435a1c0ec97b660c888ac38e3b (diff)
parentf043b0f7eaed6fad1430f149278b37d2e2a2010c (diff)
downloadprosody-d8aafa0efe7e6106b663c4f76b4e8cde33fe8944.tar.gz
prosody-d8aafa0efe7e6106b663c4f76b4e8cde33fe8944.zip
Merge 0.10->trunk
-rw-r--r--plugins/mod_admin_telnet.lua6
-rw-r--r--util/dependencies.lua2
-rw-r--r--util/helpers.lua4
3 files changed, 5 insertions, 7 deletions
diff --git a/plugins/mod_admin_telnet.lua b/plugins/mod_admin_telnet.lua
index 8e72ff9f..3250e2ed 100644
--- a/plugins/mod_admin_telnet.lua
+++ b/plugins/mod_admin_telnet.lua
@@ -32,7 +32,6 @@ local has_pposix, pposix = pcall(require, "util.pposix");
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 @@ def_env.xmpp = {};
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";
diff --git a/util/dependencies.lua b/util/dependencies.lua
index a644c395..b093e6cf 100644
--- a/util/dependencies.lua
+++ b/util/dependencies.lua
@@ -136,7 +136,7 @@ local function check_dependencies()
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";
diff --git a/util/helpers.lua b/util/helpers.lua
index bf76d258..eb38f653 100644
--- a/util/helpers.lua
+++ b/util/helpers.lua
@@ -43,14 +43,14 @@ local function show_events(events, specific_event)
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