Changeset

425:f3b65866192e

Added mod_ping with support for [XEP-0199: XMPP Ping]
author Waqas Hussain <waqas20@gmail.com>
date Wed, 26 Nov 2008 09:06:32 +0500
parents 424:3eb22492e8ab
children 426:3d8778059e90
files util/mod_ping.lua
diffstat 1 files changed, 11 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/util/mod_ping.lua	Wed Nov 26 09:06:32 2008 +0500
@@ -0,0 +1,11 @@
+
+local st = require "util.stanza";
+
+require "core.discomanager".set("ping", "urn:xmpp:ping");
+
+add_iq_handler({"c2s", "s2sin"}, "urn:xmpp:ping",
+	function(session, stanza)
+		if stanza.attr.type == "get" then
+			session.send(st.reply(stanza));
+		end
+	end);