]> ruin.nu Git - ndwebbie.git/blobdiff - scripts/ndreport.pl
Use local::lib properly
[ndwebbie.git] / scripts / ndreport.pl
index 7300e01093772e1f87cee18b030517d1abc77112..079b3f9f20d4d0e47d9b3737e4cdbcf60d2be077 100755 (executable)
@@ -22,6 +22,7 @@ q{
 
 use strict;
 use warnings;
+use local::lib;
 use DBI;
 use DBD::Pg qw(:pg_types);
 use CGI qw/:standard/;
@@ -48,7 +49,8 @@ my $email = Email::Simple->new($text);
 my $body =  encoder($email->body,'ISO-8859-15')->utf8;
 
 my $c = $dbh->prepare(q{
-SELECT coords(x,y,z) FROM current_planet_stats WHERE pid = (SELECT pid FROM users WHERE username = $1)
+SELECT coords(x,y,z) FROM current_planet_stats WHERE pid = (SELECT pid FROM users WHERE username = $1
+       AND uid IN (SELECT uid FROM groupmembers WHERE gid = 'M'))
 });
 
 my $a = $dbh->prepare(q{