Round amounts in prompt for give/take reason
This commit is contained in:
parent
0ca37f34d8
commit
af4d05c4da
2 changed files with 7 additions and 6 deletions
10
plugins/give
10
plugins/give
|
@ -25,11 +25,11 @@ sub amount {
|
|||
$self->{amount} = parse_amount($input)
|
||||
or return REJECT, "$input: Invalid amount.";
|
||||
|
||||
my $benificiary = $self->{benificiary};
|
||||
my $amount = $self->{amount};
|
||||
|
||||
return "Why are you giving $amount to $benificiary, "
|
||||
. "or enter your username to end", \&reason;
|
||||
return sprintf(
|
||||
"Why are you giving %.2f to %s, or enter your username to end",
|
||||
$self->{amount},
|
||||
$self->{benificiary}
|
||||
), \&reason;
|
||||
}
|
||||
|
||||
sub reason :Tab(whatevah) {
|
||||
|
|
|
@ -32,7 +32,8 @@ sub arg :Tab(USERS) {
|
|||
|
||||
my $them = @users == 1 ? $users[0] : 'each';
|
||||
|
||||
return "Why are you taking $each from $them?", \&reason;
|
||||
return sprintf("Why are you taking %.2f from %s?", $each, $them),
|
||||
\&reason;
|
||||
}
|
||||
|
||||
my $user = parse_user($arg);
|
||||
|
|
Loading…
Add table
Reference in a new issue