# HG changeset patch # User Kim Alvefur # Date 1661460161 -7200 # Node ID 3ab3ef9584e39207a5c9ce896cfee71b47f3d55e # Parent db8c795ca81afb64bb9843bcadaa49194d18e9b6 mod_admin_shell: Rename variable to avoid confusion with global function For luacheck, but it doesn't actually complain about this right now diff -r db8c795ca81a -r 3ab3ef9584e3 plugins/mod_admin_shell.lua --- a/plugins/mod_admin_shell.lua Thu Aug 25 22:40:41 2022 +0200 +++ b/plugins/mod_admin_shell.lua Thu Aug 25 22:42:41 2022 +0200 @@ -1265,18 +1265,18 @@ function def_env.host:list() local print = self.session.print; local i = 0; - local type; + local host_type; for host, host_session in iterators.sorted_pairs(prosody.hosts, _sort_hosts) do i = i + 1; - type = host_session.type; - if type == "local" then + host_type = host_session.type; + if host_type == "local" then print(host); else - type = module:context(host):get_option_string("component_module", type); - if type ~= "component" then - type = type .. " component"; + host_type = module:context(host):get_option_string("component_module", host_type); + if host_type ~= "component" then + host_type = host_type .. " component"; end - print(("%s (%s)"):format(host, type)); + print(("%s (%s)"):format(host, host_type)); end end return true, i.." hosts";