343 end |
343 end |
344 |
344 |
345 local print = self.session.print; |
345 local print = self.session.print; |
346 for _, host in ipairs(hosts) do |
346 for _, host in ipairs(hosts) do |
347 print(host..":"); |
347 print(host..":"); |
348 local modules = array.collect(keys(prosody.hosts[host].modules or {})):sort(); |
348 local modules = array.collect(keys(prosody.hosts[host] and prosody.hosts[host].modules or {})):sort(); |
349 if #modules == 0 then |
349 if #modules == 0 then |
350 print(" No modules loaded"); |
350 if prosody.hosts[host] then |
|
351 print(" No modules loaded"); |
|
352 else |
|
353 print(" Host not found"); |
|
354 end |
351 else |
355 else |
352 for _, name in ipairs(modules) do |
356 for _, name in ipairs(modules) do |
353 print(" "..name); |
357 print(" "..name); |
354 end |
358 end |
355 end |
359 end |