diff options
author | Kim Alvefur <zash@zash.se> | 2024-11-15 15:48:07 +0100 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2024-11-15 15:48:07 +0100 |
commit | 53edd95324ac945caf39d549addcb906c9f97690 (patch) | |
tree | d5311a4cfe789e06a2d9f91a5573ba2026993b16 /plugins | |
parent | d89b7fa67254ba4c71c112af8a3c10590252e5a2 (diff) | |
download | prosody-53edd95324ac945caf39d549addcb906c9f97690.tar.gz prosody-53edd95324ac945caf39d549addcb906c9f97690.zip |
mod_admin_shell: Refactor end of module:load
Meant to improve clarity and make improving easier
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/mod_admin_shell.lua | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/plugins/mod_admin_shell.lua b/plugins/mod_admin_shell.lua index ae7aaf98..02f7c559 100644 --- a/plugins/mod_admin_shell.lua +++ b/plugins/mod_admin_shell.lua @@ -658,7 +658,10 @@ function def_env.module:load(name, hosts) 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]] |