X-Git-Url: https://ruin.nu/git/?a=blobdiff_plain;f=lib%2FNDWeb%2FController%2FCovOp.pm;h=d114726bd440525899d205ad9e62fefe25b751c7;hb=3586132bdff6f0f1effdc21c1837597f9d533842;hp=71ea3082823427db2022ce9a4dfb38edf7b79c06;hpb=b00d7995de3f6eb15560b5ae9dac75f12e248b13;p=ndwebbie.git diff --git a/lib/NDWeb/Controller/CovOp.pm b/lib/NDWeb/Controller/CovOp.pm index 71ea308..d114726 100644 --- a/lib/NDWeb/Controller/CovOp.pm +++ b/lib/NDWeb/Controller/CovOp.pm @@ -38,10 +38,10 @@ sub distwhores : Local { sub marktarget : Local { my ( $self, $c, $target ) = @_; my $dbh = $c->model; - my $update = $dbh->prepare(q{INSERT INTO covop_attacks (uid,id,tick) VALUES(?,?,tick())}); - $update->execute($c->user->id,$target); - + eval{ + $update->execute($c->user->id,$target); + }; $c->forward('/redirect'); } @@ -52,13 +52,13 @@ sub list : Private { my $query = $dbh->prepare(q{SELECT id, coords, metal, crystal, eonium , covop_alert(seccents,structures,size,guards,gov,0) AS minalert , covop_alert(seccents,structures,size,guards,gov,50) AS maxalert - , distorters,gov + , distorters,gov,pstick,dstick , MaxResHack,co.tick AS lastcovop FROM (SELECT p.id,coords(x,y,z),size, metal,crystal,eonium,guards ,seccents,NULLIF(ds.total::integer,0) AS structures,distorters ,max_bank_hack(metal,crystal,eonium,p.value ,(SELECT value FROM current_planet_stats WHERE id = ?)) AS MaxResHack - , planet_status, relationship,gov + , planet_status, relationship,gov,ps.tick AS pstick, ds.tick AS dstick FROM current_planet_stats p LEFT OUTER JOIN current_planet_scans ps ON p.id = ps.planet LEFT OUTER JOIN current_development_scans ds ON p.id = ds.planet