Software /
code /
prosody-modules
Changeset
28:b9d063dd16d5
mod_adhoc, mod_adhoc_cmd_ping: Code cleanup
author | Florian Zeitz <florob@babelmonkeys.de> |
---|---|
date | Fri, 09 Oct 2009 21:47:20 +0200 |
parents | 26:1fb5b8c20004 |
children | 29:b384999b047f |
files | mod_adhoc/mod_adhoc.lua mod_adhoc_cmd_ping/mod_adhoc_cmd_ping.lua |
diffstat | 2 files changed, 2 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/mod_adhoc/mod_adhoc.lua Tue Oct 06 22:00:05 2009 +0200 +++ b/mod_adhoc/mod_adhoc.lua Fri Oct 09 21:47:20 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);
--- a/mod_adhoc_cmd_ping/mod_adhoc_cmd_ping.lua Tue Oct 06 22:00:05 2009 +0200 +++ b/mod_adhoc_cmd_ping/mod_adhoc_cmd_ping.lua Fri Oct 09 21:47:20 2009 +0200 @@ -16,7 +16,6 @@ local descriptor = { name="Ping", node="ping", handler=ping_command_handler }; function module.unload() - module:log("debug", "Removing ping command"); module:remove_item("adhoc", descriptor); end