From: Michael Andreen Date: Fri, 8 Jan 2010 01:34:12 +0000 (+0100) Subject: Set points before the check X-Git-Url: https://ruin.nu/git/?p=NDIRC.git;a=commitdiff_plain;h=1ab264ec25caff50e2ad8e55947b5b09e8a08e90 Set points before the check --- diff --git a/Commands/Usermgm.pm b/Commands/Usermgm.pm index 88a222e..00ebeb0 100644 --- a/Commands/Usermgm.pm +++ b/Commands/Usermgm.pm @@ -423,10 +423,10 @@ my $points = class extends NDIRC::Command { method execute ($c,$msg) { my ($nick,$points) = $msg =~ /^(\S+)(?: (-?(:?\d+|\d*\.\d+)))?$/ or die 'ARGS'; - return unless $self->check($c,$nick,$points); - $points //= 1; + return unless $self->check($c,$nick,$points); + my $dbh = $c->model; if ($points*$points > 400){