Software /
code /
prosody
Comparison
plugins/mod_admin_shell.lua @ 12676:3ab3ef9584e3
mod_admin_shell: Rename variable to avoid confusion with global function
For luacheck, but it doesn't actually complain about this right now
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Thu, 25 Aug 2022 22:42:41 +0200 |
parent | 12675:db8c795ca81a |
child | 12727:31d719ce8c64 |
comparison
equal
deleted
inserted
replaced
12675:db8c795ca81a | 12676:3ab3ef9584e3 |
---|---|
1263 end | 1263 end |
1264 | 1264 |
1265 function def_env.host:list() | 1265 function def_env.host:list() |
1266 local print = self.session.print; | 1266 local print = self.session.print; |
1267 local i = 0; | 1267 local i = 0; |
1268 local type; | 1268 local host_type; |
1269 for host, host_session in iterators.sorted_pairs(prosody.hosts, _sort_hosts) do | 1269 for host, host_session in iterators.sorted_pairs(prosody.hosts, _sort_hosts) do |
1270 i = i + 1; | 1270 i = i + 1; |
1271 type = host_session.type; | 1271 host_type = host_session.type; |
1272 if type == "local" then | 1272 if host_type == "local" then |
1273 print(host); | 1273 print(host); |
1274 else | 1274 else |
1275 type = module:context(host):get_option_string("component_module", type); | 1275 host_type = module:context(host):get_option_string("component_module", host_type); |
1276 if type ~= "component" then | 1276 if host_type ~= "component" then |
1277 type = type .. " component"; | 1277 host_type = host_type .. " component"; |
1278 end | 1278 end |
1279 print(("%s (%s)"):format(host, type)); | 1279 print(("%s (%s)"):format(host, host_type)); |
1280 end | 1280 end |
1281 end | 1281 end |
1282 return true, i.." hosts"; | 1282 return true, i.." hosts"; |
1283 end | 1283 end |
1284 | 1284 |