From e71df9b0928e62f89b4263a9653a94b25617dbb5 Mon Sep 17 00:00:00 2001 From: Juerd Waalboer Date: Tue, 12 Apr 2022 19:39:14 +0200 Subject: [PATCH] Warn from 19.84 instead of 13.37 This should probably not be hardcoded, but revbank currently has no configuration mechanism. --- lib/RevBank/Messages.pm | 2 +- plugins/revspace_saldo | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/RevBank/Messages.pm b/lib/RevBank/Messages.pm index 7baaf83..b21f984 100644 --- a/lib/RevBank/Messages.pm +++ b/lib/RevBank/Messages.pm @@ -55,7 +55,7 @@ sub hook_user_balance($class, $username, $old, $delta, $new, @) { my $sign = $delta->cents >= 0 ? '+' : '-'; my $rood = $new->cents < 0 ? '31;' : ''; my $abs = $delta->abs; - my $warn = $new->cents < -1337 ? " \e[5;1m(!!)\e[0m" : ""; + my $warn = $new->cents < -1984 ? " \e[5;1m(!!)\e[0m" : ""; $_ = $_->string("+") for $old, $new; printf "New balance for $username: $old $sign $abs = \e[${rood}1m$new\e[0m$warn\n", diff --git a/plugins/revspace_saldo b/plugins/revspace_saldo index 17488cf..97fd862 100644 --- a/plugins/revspace_saldo +++ b/plugins/revspace_saldo @@ -16,7 +16,7 @@ sub hook_checkout_done($class, $cart, $user, $transaction_id, @) { my $balance = RevBank::Users::balance($user) or return; my $since = RevBank::Users::since($user); - if ($balance < -13.37) { + if ($balance < -19.84) { _box( "Hoi $user,", "",