From 49a9a1e76a34d67cfa2be24cbb2e2a9db545f969 Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Sat, 2 Jul 2022 17:31:14 +0200 Subject: util: Remove various Lua 5.1 compatibility hacks Part of #1600 --- util/prosodyctl/shell.lua | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'util/prosodyctl/shell.lua') diff --git a/util/prosodyctl/shell.lua b/util/prosodyctl/shell.lua index 8f910301..5f99bec1 100644 --- a/util/prosodyctl/shell.lua +++ b/util/prosodyctl/shell.lua @@ -80,8 +80,7 @@ local function start(arg) --luacheck: ignore 212/arg 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() -- cgit v1.2.3