]> ruin.nu Git - NDIRC.git/blobdiff - Commands/Usermgm.pm
Some module preloading and cleanup
[NDIRC.git] / Commands / Usermgm.pm
index 02ff82df133a1b9c56a4ddab662d503545586479..eed0d19718b2774bfab1f951d054e928a3dd4eeb 100644 (file)
@@ -423,7 +423,7 @@ 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);
+               return unless $self->check($c,$nick,$points);
 
                $points //= 1;
 
@@ -449,7 +449,7 @@ my $points = class extends NDIRC::Command {
                }
                $f->finish;
        }
-       method check ($c,$nick) {
+       method check ($c,$nick,$points) {
                return 1;
        }
 };
@@ -460,7 +460,7 @@ command a => {
        acl => q(irc_a)
 }, class {
        extends $points->name;
-       method check ($c,$nick) {
+       method check ($c,$nick,$points) {
                my ($fleets) = $c->model->selectrow_array(q{
 SELECT count(*) FROM raids r
        JOIN raid_targets rt ON r.id = rt.raid