X-Git-Url: https://git.enpas.org/?a=blobdiff_plain;ds=sidebyside;f=plugins%2Fmod_ping.lua;h=e0324c80264e49988064112342b9c989636104c1;hb=7cde004ab530110577c5107636bc010576f29df1;hp=78bdb2225cf331547a3a218ec2f482e581385d0f;hpb=10904eb0553bd5e6efadbd8ab04ed77c49aa03b9;p=prosody.git diff --git a/plugins/mod_ping.lua b/plugins/mod_ping.lua index 78bdb222..e0324c80 100644 --- a/plugins/mod_ping.lua +++ b/plugins/mod_ping.lua @@ -1,31 +1,20 @@ --- Prosody IM v0.1 --- Copyright (C) 2008 Matthew Wild --- Copyright (C) 2008 Waqas Hussain +-- Prosody IM +-- Copyright (C) 2008-2009 Matthew Wild +-- Copyright (C) 2008-2009 Waqas Hussain -- --- This program is free software; you can redistribute it and/or --- modify it under the terms of the GNU General Public License --- as published by the Free Software Foundation; either version 2 --- of the License, or (at your option) any later version. --- --- This program is distributed in the hope that it will be useful, --- but WITHOUT ANY WARRANTY; without even the implied warranty of --- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the --- GNU General Public License for more details. --- --- You should have received a copy of the GNU General Public License --- along with this program; if not, write to the Free Software --- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +-- This project is MIT/X11 licensed. Please see the +-- COPYING file in the source package for more information. -- - -local st = require "util.stanza"; - -require "core.discomanager".set("ping", "urn:xmpp:ping"); - -module:add_iq_handler({"c2s", "s2sin"}, "urn:xmpp:ping", - function(session, stanza) - if stanza.attr.type == "get" then - session.send(st.reply(stanza)); - end - end); + +local st = require "util.stanza"; + +module:add_feature("urn:xmpp:ping"); + +module:add_iq_handler({"c2s", "s2sin"}, "urn:xmpp:ping", + function(session, stanza) + if stanza.attr.type == "get" then + session.send(st.reply(stanza)); + end + end);