# HG changeset patch # User Florian Zeitz # Date 1260396499 -3600 # Node ID 9b63fd1196c051a0a83265458bfe2a772c727336 # Parent 4c2b35e3d97906034c2e08cbc6782f2f9c3d9922 mod_adhoc_cmd*: Don't explicitly remove items. Handled by Prosody itself already mod_adhoc: Remove superfluous space diff -r 4c2b35e3d979 -r 9b63fd1196c0 mod_adhoc/adhoc/mod_adhoc.lua --- a/mod_adhoc/adhoc/mod_adhoc.lua Tue Dec 08 21:29:41 2009 +0100 +++ b/mod_adhoc/adhoc/mod_adhoc.lua Wed Dec 09 23:08:19 2009 +0100 @@ -50,7 +50,7 @@ end, 500); module:hook("item-added/adhoc", function (event) - commands[ # commands + 1] = event.item; + commands[ #commands + 1] = event.item; end, 500); local _G = _G; diff -r 4c2b35e3d979 -r 9b63fd1196c0 mod_adhoc_cmd_admin/mod_adhoc_cmd_admin.lua --- a/mod_adhoc_cmd_admin/mod_adhoc_cmd_admin.lua Tue Dec 08 21:29:41 2009 +0100 +++ b/mod_adhoc_cmd_admin/mod_adhoc_cmd_admin.lua Wed Dec 09 23:08:19 2009 +0100 @@ -273,14 +273,6 @@ local get_online_users_desc = adhoc_new("Get List of Online Users", "http://jabber.org/protocol/admin#get-online-users", get_online_users_command_handler, "admin"); local announce_desc = adhoc_new("Send Announcement to Online Users", "http://jabber.org/protocol/admin#announce", announce_handler, "admin"); -function module.unload() - module:remove_item("adhoc", add_user_desc); - module:remove_item("adhoc", delete_user_desc); - module:remove_item("adhoc", get_user_password_desc); - module:remove_item("adhoc", get_online_users_desc); - module:remove_item("adhoc", announce_desc); -end - module:add_item("adhoc", add_user_desc); module:add_item("adhoc", delete_user_desc); module:add_item("adhoc", get_user_password_desc); diff -r 4c2b35e3d979 -r 9b63fd1196c0 mod_adhoc_cmd_ping/mod_adhoc_cmd_ping.lua --- a/mod_adhoc_cmd_ping/mod_adhoc_cmd_ping.lua Tue Dec 08 21:29:41 2009 +0100 +++ b/mod_adhoc_cmd_ping/mod_adhoc_cmd_ping.lua Wed Dec 09 23:08:19 2009 +0100 @@ -15,9 +15,5 @@ local descriptor = adhoc_new("Ping", "ping", ping_command_handler); -function module.unload() - module:remove_item("adhoc", descriptor); -end - module:add_item ("adhoc", descriptor); diff -r 4c2b35e3d979 -r 9b63fd1196c0 mod_adhoc_cmd_uptime/mod_adhoc_cmd_uptime.lua --- a/mod_adhoc_cmd_uptime/mod_adhoc_cmd_uptime.lua Tue Dec 08 21:29:41 2009 +0100 +++ b/mod_adhoc_cmd_uptime/mod_adhoc_cmd_uptime.lua Wed Dec 09 23:08:19 2009 +0100 @@ -30,9 +30,5 @@ local descriptor = adhoc_new("Get uptime", "uptime", uptime_command_handler); -function module.unload() - module:remove_item("adhoc", descriptor); -end - module:add_item ("adhoc", descriptor);