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 | 1d7a924a0b892389680cb0672502592531e2c7c1 (patch) | |
tree | 2047c1ae46465b4bac1a42f6d38639b5560df9b9 /plugins/mod_admin_adhoc.lua | |
parent | 585a880d381a7d3e0642c99e1469bfda71589787 (diff) | |
download | prosody-1d7a924a0b892389680cb0672502592531e2c7c1.tar.gz prosody-1d7a924a0b892389680cb0672502592531e2c7c1.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 |