From 53edd95324ac945caf39d549addcb906c9f97690 Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Fri, 15 Nov 2024 15:48:07 +0100 Subject: mod_admin_shell: Refactor end of module:load Meant to improve clarity and make improving easier --- plugins/mod_admin_shell.lua | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'plugins') 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]] -- cgit v1.2.3