3
0
mirror of https://github.com/pragma-/pbot.git synced 2024-12-24 03:33:06 +01:00

NickList: slightly improve error-checking for nicklist arguments

This commit is contained in:
Pragmatic Software 2020-05-17 23:31:25 -07:00
parent 33fd788988
commit 46cad2050c

View File

@ -72,8 +72,8 @@ sub cmd_nicklist {
'join|j' => \$include_join,
);
return "$getopt_error; $usage" if defined $getopt_error;
return $usage if not length $args[0];
return "Too many arguments -- $usage" if @args > 2;
return $usage if @args == 0 or not length $args[0];
my %sort = (
'spoken' => sub {