# HG changeset patch # User Kim Alvefur # Date 1731682087 -3600 # Node ID d8f7a8a2696591faffee67ea6f6756a6023d48d0 # Parent ccf389f54a93ef10e846d39ccb2818e1ff1aacad mod_admin_shell: Refactor end of module:load Meant to improve clarity and make improving easier diff -r ccf389f54a93 -r d8f7a8a26965 plugins/mod_admin_shell.lua --- 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]]