]> ruin.nu Git - ndwebbie.git/blobdiff - ND/Web/Pages/AddIntel.pm
parse scans from waves.pl too
[ndwebbie.git] / ND / Web / Pages / AddIntel.pm
index 9a2840d5c56e8d0e17e8642ae067cbb8b6b2fab4..916dc99a33431cf796e049fc64d8a69664766931 100644 (file)
@@ -24,7 +24,7 @@ use CGI qw/:standard/;
 use ND::Web::Forum;
 use ND::Web::Include;
 
-our @ISA = qw/ND::Web::XMLPage/;
+use base qw/ND::Web::XMLPage/;
 
 $ND::Web::Page::PAGES{addintel} = 'ND::Web::Pages::AddIntel';
 
@@ -47,7 +47,7 @@ sub render_body {
                        my $addpoint = $DBH->prepare('UPDATE users SET scan_points = scan_points + 1 WHERE uid = ? ');
                        my $intel = param('intel');
                        my @scans;
-                       while ($intel =~ m/http:\/\/game.planetarion.com\/showscan.pl\?scan_id=(\d+)/g){
+                       while ($intel =~ m/http:\/\/game.planetarion.com\/.+?scan(?:_id)?=(\d+)/g){
                                my %scan;
                                $scan{Scan} = $1;
                                $scan{Message} = "Scan $1: ";
@@ -68,7 +68,7 @@ sub render_body {
                        my $tick = $self->{TICK};
                        $tick = param('tick') if $tick =~ /^(\d+)$/;
                        my $addintel = $DBH->prepare(qq{SELECT add_intel(?,?,?,?,?,?,?,?,?,?,?)});
-                       while ($intel =~ m/(\d+):(\d+):(\d+)\*?\s+(\d+):(\d+):(\d+)\*?\s+.+(?:Ter|Cat|Xan|Zik)?\s+(\d+)\s+(Attack|Defend)\s+(\d+)/g){
+                       while ($intel =~ m/(\d+):(\d+):(\d+)\*?\s+(\d+):(\d+):(\d+)\*?\s+.+(?:Ter|Cat|Xan|Zik|Etd)?\s+(\d+)\s+(Attack|Defend)\s+(\d+)/g){
                                $addintel->execute($tick,$9, $1,$2,$3,$4,$5,$6,$7,$8,$ND::UID) or $error .= $DBH->errstr;
                        }
                }