Changeset

85:8bc27e310e64

clix.raw: Add a ping command to the sandbox
author Kim Alvefur <zash@zash.se>
date Fri, 29 Jun 2012 20:52:29 +0200
parents 84:1b4e64176288
children 86:12939dcba0f2
files clix/raw.lua
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- 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