take: Improve error message
First arg must be a username, so "and not a valid amount" is misleading.
This commit is contained in:
parent
bdd92748ab
commit
243b34e295
1 changed files with 1 additions and 1 deletions
|
@ -36,7 +36,7 @@ sub arg :Tab(USERS) ($self, $cart, $arg, @) {
|
|||
push @{ $self->{users} }, $user;
|
||||
} else {
|
||||
return REJECT, "$arg: No such user" .
|
||||
($amount ? "." : ", and not a valid amount.");
|
||||
($amount || !@{ $self->{users} } ? "." : ", and not a valid amount.");
|
||||
}
|
||||
|
||||
return "User to take from, or total amount to finish", \&arg;
|
||||
|
|
Loading…
Add table
Reference in a new issue