aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/mod_invites.lua
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2024-01-21 20:08:00 +0100
committerKim Alvefur <zash@zash.se>2024-01-21 20:08:00 +0100
commit607f8ffee53e6ead80c5c885a455d6396ddc77ee (patch)
tree8be2d52b86a38738c5b1e888292d8471d6babc3a /plugins/mod_invites.lua
parenta2539d4dcda7910ed5f725badc5f5be75ffa44a7 (diff)
downloadprosody-607f8ffee53e6ead80c5c885a455d6396ddc77ee.tar.gz
prosody-607f8ffee53e6ead80c5c885a455d6396ddc77ee.zip
mod_invites: Fix argument handling
Not sure what the next() was supposed to do. Reject unknown --options perhaps?
Diffstat (limited to 'plugins/mod_invites.lua')
-rw-r--r--plugins/mod_invites.lua2
1 files changed, 1 insertions, 1 deletions
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