]> ruin.nu Git - NDIRC.git/blobdiff - Commands/Usermgm.pm
Set points before the check
[NDIRC.git] / 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){