diff options
author | Florian Zeitz <florob@babelmonkeys.de> | 2013-02-06 00:53:49 +0100 |
---|---|---|
committer | Florian Zeitz <florob@babelmonkeys.de> | 2013-02-06 00:53:49 +0100 |
commit | ca3c3c66692495aa0a6d7772e77bcc2371176154 (patch) | |
tree | 2047c1ae46465b4bac1a42f6d38639b5560df9b9 /plugins/mod_admin_adhoc.lua | |
parent | a08a3edf11a53fc6c0545bda9de2558794739af8 (diff) | |
download | prosody-ca3c3c66692495aa0a6d7772e77bcc2371176154.tar.gz prosody-ca3c3c66692495aa0a6d7772e77bcc2371176154.zip |
mod_admin_adhoc: Fix info message for module reload/unload
Diffstat (limited to 'plugins/mod_admin_adhoc.lua')
-rw-r--r-- | plugins/mod_admin_adhoc.lua | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/plugins/mod_admin_adhoc.lua b/plugins/mod_admin_adhoc.lua index 96cb3a76..bf00b73d 100644 --- a/plugins/mod_admin_adhoc.lua +++ b/plugins/mod_admin_adhoc.lua @@ -544,7 +544,8 @@ function reload_modules_handler(self, data, state) err_list[#err_list + 1] = module .. "(Error: " .. tostring(err) .. ")"; end end - local info = (#ok_list > 0 and ("The following modules were successfully reloaded on host "..data.to..":\n"..t_concat(ok_list, "\n")) or "").. + local info = (#ok_list > 0 and ("The following modules were successfully reloaded on host "..data.to..":\n"..t_concat(ok_list, "\n")) or "") + .. ((#ok_list > 0 and #err_list > 0) and "\n" or "") .. (#err_list > 0 and ("Failed to reload the following modules on host "..data.to..":\n"..t_concat(err_list, "\n")) or ""); return { status = "completed", info = info }; else @@ -642,7 +643,8 @@ function unload_modules_handler(self, data, state) err_list[#err_list + 1] = module .. "(Error: " .. tostring(err) .. ")"; end end - local info = (#ok_list > 0 and ("The following modules were successfully unloaded on host "..data.to..":\n"..t_concat(ok_list, "\n")) or "").. + local info = (#ok_list > 0 and ("The following modules were successfully unloaded on host "..data.to..":\n"..t_concat(ok_list, "\n")) or "") + .. ((#ok_list > 0 and #err_list > 0) and "\n" or "") .. (#err_list > 0 and ("Failed to unload the following modules on host "..data.to..":\n"..t_concat(err_list, "\n")) or ""); return { status = "completed", info = info }; else |