Changeset

13413:992389af2372

mod_invites: Fix argument handling Not sure what the next() was supposed to do. Reject unknown --options perhaps?
author Kim Alvefur <zash@zash.se>
date Sun, 21 Jan 2024 20:08:00 +0100
parents 13412:0e96d6a29a12
children 13414:d54364746a7c
files plugins/mod_invites.lua
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/plugins/mod_invites.lua	Sat Jan 13 11:00:20 2024 +0100
+++ b/plugins/mod_invites.lua	Sun Jan 21 20:08:00 2024 +0100
@@ -277,7 +277,7 @@
 	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