From 607f8ffee53e6ead80c5c885a455d6396ddc77ee Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Sun, 21 Jan 2024 20:08:00 +0100 Subject: mod_invites: Fix argument handling Not sure what the next() was supposed to do. Reject unknown --options perhaps? --- plugins/mod_invites.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/mod_invites.lua b/plugins/mod_invites.lua index dedd3aa5..559170cc 100644 --- a/plugins/mod_invites.lua +++ b/plugins/mod_invites.lua @@ -277,7 +277,7 @@ function subcommands.generate(arg) end local earlyopts = argparse.parse(arg, { short_params = { h = "help"; ["?"] = "help" } }); - if earlyopts.help or next(earlyopts) ~= nil then + if earlyopts.help or not earlyopts[1] then return help(); end -- cgit v1.2.3