]> ruin.nu Git - NDIRC.git/commitdiff
Set points before the check
authorMichael Andreen <harv@ruin.nu>
Fri, 8 Jan 2010 01:34:12 +0000 (02:34 +0100)
committerMichael Andreen <harv@ruin.nu>
Fri, 8 Jan 2010 01:34:12 +0000 (02:34 +0100)
Commands/Usermgm.pm

index 88a222ebfa9e87ff9243e63ba62ca1359cab90ba..00ebeb0d77ff4064b871a9b13d52e56489c32b18 100644 (file)
@@ -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){