Software /
code /
prosody
Changeset
5326:e96361eb8286
mod_admin_adhoc: Fix info message for module reload/unload
author | Florian Zeitz <florob@babelmonkeys.de> |
---|---|
date | Wed, 06 Feb 2013 00:53:49 +0100 |
parents | 5325:97bf651e32a4 |
children | 5327:b0c36b043f00 |
files | plugins/mod_admin_adhoc.lua |
diffstat | 1 files changed, 4 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/plugins/mod_admin_adhoc.lua Wed Feb 06 00:51:25 2013 +0100 +++ b/plugins/mod_admin_adhoc.lua Wed Feb 06 00:53:49 2013 +0100 @@ -544,7 +544,8 @@ 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 @@ 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