X-Git-Url: https://ruin.nu/git/?a=blobdiff_plain;f=Members.pm;h=462c6884e11ad2d7fe11f00b4197e5b7d003d7ce;hb=490d9c4cc048f00111f8979b20a34c5adaf22006;hp=e60ecde6820886bfa35f0dc04f8d98ad75dd42c2;hpb=9b9f9324f849f89d812a73e6f7fdc36205b24e92;p=NDIRC.git diff --git a/Members.pm b/Members.pm index e60ecde..462c688 100644 --- a/Members.pm +++ b/Members.pm @@ -28,18 +28,16 @@ our @ISA = qw/Exporter/; our @EXPORT = qw/currentCalls showraids checkPoints findSMS/; sub currentCalls { - my ($verbose) = @_; - DB(); + my ($msg, $command) = @_; if (1){ #TODO: add check for member my $f = $ND::DBH->prepare(<= 7 - GROUP BY c.id,c.landing_tick,dc.username,p.x + GROUP BY c.id,c.landing_tick,dc.username ORDER BY c.landing_tick; SQL ); @@ -48,17 +46,16 @@ SQL while (my @row = $f->fetchrow()){ chop($row[1]); my $dc = defined $row[2] ? $row[2] : ''; - $calls .= " (Anti $row[1] ETA: $row[0] Cluster: $row[3] DC: $dc) |" + $calls .= " (Anti $row[1] ETA: $row[0] DC: $dc) |" } chop($calls); - if (defined $verbose || length $calls > 0){ + if (defined $command || length $calls > 0){ $ND::server->command("msg $ND::target Current calls: $calls"); } } } sub showraids { - DB(); if (1){ #TODO: add check for member my $f = $ND::DBH->prepare(<execute(); my $calls = ""; while (my ($raid) = $f->fetchrow()){ - $calls .= " https://nd.ruin.nu/raids?raid=$raid |" + $calls .= " http://nd.ruin.nu/raids?raid=$raid |" } $calls = "No open future raids" if ($f->rows == 0); chop($calls); @@ -78,8 +75,7 @@ SQL } sub checkPoints { - my ($nick) = @_; - DB(); + my ($nick,$command) = @_; my $f; if ($nick){ if (officer() || dc() || bc()){