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)
|
$self->{amount} = parse_amount($input)
|
||||||
or return REJECT, "$input: Invalid amount.";
|
or return REJECT, "$input: Invalid amount.";
|
||||||
|
|
||||||
my $benificiary = $self->{benificiary};
|
return sprintf(
|
||||||
my $amount = $self->{amount};
|
"Why are you giving %.2f to %s, or enter your username to end",
|
||||||
|
$self->{amount},
|
||||||
return "Why are you giving $amount to $benificiary, "
|
$self->{benificiary}
|
||||||
. "or enter your username to end", \&reason;
|
), \&reason;
|
||||||
}
|
}
|
||||||
|
|
||||||
sub reason :Tab(whatevah) {
|
sub reason :Tab(whatevah) {
|
||||||
|
|
|
@ -32,7 +32,8 @@ sub arg :Tab(USERS) {
|
||||||
|
|
||||||
my $them = @users == 1 ? $users[0] : 'each';
|
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);
|
my $user = parse_user($arg);
|
||||||
|
|
Loading…
Add table
Reference in a new issue