X-Git-Url: https://ruin.nu/git/?a=blobdiff_plain;f=scripts%2Fndreport.pl;h=079b3f9f20d4d0e47d9b3737e4cdbcf60d2be077;hb=d7a6ccfe91936435b4e2cff7ab1ffcf8967ed69d;hp=7300e01093772e1f87cee18b030517d1abc77112;hpb=50e2cfa738765f4de658193277b7ab6d7dc814cc;p=ndwebbie.git diff --git a/scripts/ndreport.pl b/scripts/ndreport.pl index 7300e01..079b3f9 100755 --- a/scripts/ndreport.pl +++ b/scripts/ndreport.pl @@ -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{