Diff

util/prosodyctl/shell.lua @ 12573:0f4feaf9ca64

util: Remove various Lua 5.1 compatibility hacks Part of #1600
author Kim Alvefur <zash@zash.se>
date Sat, 02 Jul 2022 17:31:14 +0200
parent 12539:cfdc8cca64d3
child 12864:9f9633364044
line wrap: on
line diff
--- a/util/prosodyctl/shell.lua	Sat Jul 02 17:30:34 2022 +0200
+++ b/util/prosodyctl/shell.lua	Sat Jul 02 17:31:14 2022 +0200
@@ -80,8 +80,7 @@
 	if arg[1] then
 		if arg[2] then
 			-- prosodyctl shell module reload foo bar.com --> module:reload("foo", "bar.com")
-			-- COMPAT Lua 5.1 doesn't have the separator argument to string.rep
-			arg[1] = string.format("%s:%s("..string.rep("%q, ", #arg-2):sub(1, -3)..")", unpack(arg));
+			arg[1] = string.format("%s:%s("..string.rep("%q", #arg-2,", ")..")", unpack(arg));
 		end
 
 		client.events.add_handler("connected", function()