X-Git-Url: https://git.enpas.org/?a=blobdiff_plain;f=core%2Fdiscomanager.lua;h=fe63f972cc0453eec3193a1970d41737a31f83ce;hb=61fbebe4017d142510fbcfce61714ecb48b99503;hp=ce0010d85720c7c54276be188ef3b196153b0acb;hpb=b9c54461bf031f807fa67f9730a3f1e04eb052a0;p=prosody.git diff --git a/core/discomanager.lua b/core/discomanager.lua index ce0010d8..fe63f972 100644 --- a/core/discomanager.lua +++ b/core/discomanager.lua @@ -1,3 +1,23 @@ +-- Prosody IM v0.2 +-- Copyright (C) 2008 Matthew Wild +-- Copyright (C) 2008 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. +-- + + local helper = require "util.discohelper".new(); local hosts = hosts; @@ -10,7 +30,7 @@ local print = print; do helper:addDiscoInfoHandler("*host", function(reply, to, from, node) if hosts[to] then - reply:tag("identity", {category="server", type="im", name="lxmppd"}):up(); + reply:tag("identity", {category="server", type="im", name="Prosody"}):up(); return true; end end); @@ -21,6 +41,11 @@ do return true; end end); + helper:addDiscoItemsHandler("*host", function(reply, to, from, node) + if hosts[to] and hosts[to].type == "local" then + return true; + end + end); end module "discomanager"