Software /
code /
prosody
Comparison
core/discomanager.lua @ 420:aa1db0a80089
Minor bug fix
author | Waqas Hussain <waqas20@gmail.com> |
---|---|
date | Wed, 26 Nov 2008 08:26:24 +0500 |
parent | 419:af362df8e6fd |
child | 517:afd9f6590fd0 |
comparison
equal
deleted
inserted
replaced
419:af362df8e6fd | 420:aa1db0a80089 |
---|---|
35 | 35 |
36 function addDiscoInfoHandler(jid, func) | 36 function addDiscoInfoHandler(jid, func) |
37 return helper:addDiscoInfoHandler(jid, func); | 37 return helper:addDiscoInfoHandler(jid, func); |
38 end | 38 end |
39 | 39 |
40 function set(plugin, origin, var) | 40 function set(plugin, var, origin) |
41 -- TODO handle origin and host based on plugin. | 41 -- TODO handle origin and host based on plugin. |
42 local handler = function(reply, to, from, node) -- service discovery | 42 local handler = function(reply, to, from, node) -- service discovery |
43 if #node == 0 then | 43 if #node == 0 then |
44 reply:tag("feature", {var = var}); | 44 reply:tag("feature", {var = var}):up(); |
45 return true; | 45 return true; |
46 end | 46 end |
47 end | 47 end |
48 addDiscoInfoHandler("*node", handler); | 48 addDiscoInfoHandler("*node", handler); |
49 addDiscoInfoHandler("*host", handler); | 49 addDiscoInfoHandler("*host", handler); |