aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/mod_admin_telnet.lua
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
commitda42ca2167a2051d2fa85400be3ce0f516909704 (patch)
tree10c5a2294941641099a92c40f24081bcf121cd8f /plugins/mod_admin_telnet.lua
parent59e7a632af33944016e3cbdb8a787a82188314ba (diff)
parent383aa66ca845f5f85684f9a30f8bc0933513fe98 (diff)
downloadprosody-da42ca2167a2051d2fa85400be3ce0f516909704.tar.gz
prosody-da42ca2167a2051d2fa85400be3ce0f516909704.zip
Merge 0.10->trunk
Diffstat (limited to 'plugins/mod_admin_telnet.lua')
-rw-r--r--plugins/mod_admin_telnet.lua6
1 files changed, 2 insertions, 4 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";