X-Git-Url: https://ruin.nu/git/?a=blobdiff_plain;f=ND%2FWeb%2FPages%2FAddIntel.pm;h=01d28505919079799f19159358993d7f5ee81d40;hb=53bd0c35d3b4771e8d5fdbd6e99cc7ccd4ef8b71;hp=9a2840d5c56e8d0e17e8642ae067cbb8b6b2fab4;hpb=256609e2df07f5dd40a33ace6163d2b72a269246;p=ndwebbie.git diff --git a/ND/Web/Pages/AddIntel.pm b/ND/Web/Pages/AddIntel.pm index 9a2840d..01d2850 100644 --- a/ND/Web/Pages/AddIntel.pm +++ b/ND/Web/Pages/AddIntel.pm @@ -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'; @@ -42,12 +42,12 @@ sub render_body { if (defined param('cmd')){ if (param('cmd') eq 'submit' || param('cmd') eq 'submit_message'){ - my $findscan = $DBH->prepare("SELECT scan_id FROM scans WHERE scan_id = ? AND tick >= tick() - 48"); + my $findscan = $DBH->prepare("SELECT scan_id FROM scans WHERE scan_id = ? AND tick >= tick() - 168"); my $addscan = $DBH->prepare('INSERT INTO scans (scan_id,tick,"type") VALUES (?,tick(),?)'); 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; } }