Software /
code /
prosody
Changeset
13561:d8f7a8a26965
mod_admin_shell: Refactor end of module:load
Meant to improve clarity and make improving easier
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Fri, 15 Nov 2024 15:48:07 +0100 |
parents | 13560:ccf389f54a93 |
children | 13562:f77c247258cc |
files | plugins/mod_admin_shell.lua |
diffstat | 1 files changed, 4 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/plugins/mod_admin_shell.lua Fri Nov 15 14:37:10 2024 +0000 +++ b/plugins/mod_admin_shell.lua Fri Nov 15 15:48:07 2024 +0100 @@ -658,7 +658,10 @@ end end - return ok, (ok and "Module loaded onto "..count.." host"..(count ~= 1 and "s" or "")) or ("Last error: "..tostring(err)); + if not ok then + return ok, "Last error: "..tostring(err); + end + return ok, "Module loaded onto "..count.." host"..(count ~= 1 and "s" or ""); end describe_command [[module:unload(module, host) - The same, but just unloads the module from memory]]