Diff

plugins/mod_admin_shell.lua @ 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
parent 13542:67288253d9a2
child 13562:f77c247258cc
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]]