mod_admin_adhoc: Remove unused loop variables [luacheck]
authorKim Alvefur <zash@zash.se>
Sun, 30 Sep 2018 13:37:51 +0200
changeset 9402 ec60e74fd9bb
parent 9401 7f8ba13b4dd6
child 9403 9ef746c2a644
mod_admin_adhoc: Remove unused loop variables [luacheck]
plugins/mod_admin_adhoc.lua
--- a/plugins/mod_admin_adhoc.lua	Sun Sep 30 13:37:13 2018 +0200
+++ b/plugins/mod_admin_adhoc.lua	Sun Sep 30 13:37:51 2018 +0200
@@ -295,7 +295,7 @@
 		return generate_error_message(err);
 	end
 
-	local user, host, resource = jid.split(fields.accountjid);
+	local user, host = jid.split(fields.accountjid);
 	if host ~= module_host then
 		return { status = "completed", error = { message = "Tried to get stats for a user on " .. host .. " but command was sent to " .. module_host } };
 	elseif not usermanager_user_exists(user, host) then
@@ -594,7 +594,7 @@
 	end
 
 	local ok_list, err_list = {}, {};
-	for host_name, host in pairs(hosts) do
+	for host_name in pairs(hosts) do
 		if modulemanager.is_loaded(host_name, fields.module)  then
 			local ok, err = modulemanager.reload(host_name, fields.module);
 			if ok then
@@ -739,7 +739,7 @@
 	end
 
 	local ok_list, err_list = {}, {};
-	for host_name, host in pairs(hosts) do
+	for host_name in pairs(hosts) do
 		if modulemanager.is_loaded(host_name, fields.module)  then
 			local ok, err = modulemanager.unload(host_name, fields.module);
 			if ok then