util/mod_ping.lua
changeset 427 3288dd8d9669
parent 426 3d8778059e90
child 428 e717ecc97d2e
equal deleted inserted replaced
426:3d8778059e90 427:3288dd8d9669
     1 
       
     2 local st = require "util.stanza";
       
     3 
       
     4 require "core.discomanager".set("ping", "urn:xmpp:ping");
       
     5 
       
     6 add_iq_handler({"c2s", "s2sin"}, "urn:xmpp:ping",
       
     7 	function(session, stanza)
       
     8 		if stanza.attr.type == "get" then
       
     9 			session.send(st.reply(stanza));
       
    10 		end
       
    11 	end);