clix.raw: Add a ping command to the sandbox

Fri, 29 Jun 2012 20:52:29 +0200

author
Kim Alvefur <zash@zash.se>
date
Fri, 29 Jun 2012 20:52:29 +0200
changeset 85
8bc27e310e64
parent 84
1b4e64176288
child 86
12939dcba0f2

clix.raw: Add a ping command to the sandbox

clix/raw.lua file | annotate | diff | comparison | revisions
--- a/clix/raw.lua	Fri Jun 29 20:50:01 2012 +0200
+++ b/clix/raw.lua	Fri Jun 29 20:52:29 2012 +0200
@@ -44,6 +44,9 @@
 				m = verse.message,
 				p = verse.presence,
 				iq = verse.iq,
+				ping = function(host)
+					return verse.iq{ type="get", to=host}:tag("ping", {xmlns="urn:xmpp:ping"});
+				end,
 			}});
 			local function on_incoming(stdin, data)
 				if not data then

mercurial