local jid_bare = require "util.jid".bare;\r
local usermanager_user_exists = require "core.usermanager".user_exists;\r
local rostermanager_is_contact_subscribed = require "core.rostermanager".is_contact_subscribed;\r
+local print = print;\r
\r
do\r
helper:addDiscoInfoHandler("*host", function(reply, to, from, node)\r
return helper:addDiscoInfoHandler(jid, func);\r
end\r
\r
+function set(plugin, var, origin)\r
+ -- TODO handle origin and host based on plugin.\r
+ local handler = function(reply, to, from, node) -- service discovery\r
+ if #node == 0 then\r
+ reply:tag("feature", {var = var}):up();\r
+ return true;\r
+ end\r
+ end\r
+ addDiscoInfoHandler("*node", handler);\r
+ addDiscoInfoHandler("*host", handler);\r
+end\r
+\r
return _M;\r