Mercurial > prosody-modules
diff mod_adhoc/mod_adhoc.lua @ 30:fc4806a98fc4
merge ...
author | Thilo Cestonaro <thilo@cestona.ro> |
---|---|
date | Fri, 09 Oct 2009 23:23:54 +0200 |
parents | b9d063dd16d5 |
children |
line wrap: on
line diff
--- a/mod_adhoc/mod_adhoc.lua Fri Oct 09 23:23:12 2009 +0200 +++ b/mod_adhoc/mod_adhoc.lua Fri Oct 09 23:23:54 2009 +0200 @@ -16,7 +16,7 @@ reply:tag("query", {xmlns="http://jabber.org/protocol/disco#items", node="http://jabber.org/protocol/commands"}) for i = 1, #commands do -- module:log("info", "adding command %s", commands[i].name); - reply:tag("item", {name=commands[i].name, node=commands[i].node, jid=module:get_host()}); + reply:tag("item", {name=commands[i].name, node=commands[i].node, jid=module:get_host()}); reply:up(); end origin.send(reply); @@ -43,10 +43,10 @@ local _G = _G; local t_remove = _G.table.remove; module:hook("item-removed/adhoc", function (event) - module:log("debug", "Remove function called"); for i = 1, #commands do if commands[i].node == event.item.node then t_remove(commands, i); + break; end end end, 500);