Software /
code /
prosody
Diff
plugins/mod_invites.lua @ 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 |
parent | 13412:0e96d6a29a12 |
child | 13520:662dfff658a0 |
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