Diff

plugins/mod_admin_telnet.lua @ 7723:488fddf88ffd

Merge 0.10->trunk
author Kim Alvefur <zash@zash.se>
date Sat, 19 Nov 2016 01:05:36 +0100
parent 7640:279f348e9a92
parent 7722:82333dfdfaff
child 7923:81f3068fc30c
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";