- WHERE i.call = ? AND p.id = planetid(?,?,?,0)
+ WHERE i.call = ? AND p.id = planetid(?,?,?,tick())
});
$fleet->execute($id,$x,$y,$z);
}else{
});
$fleet->execute($id,$x,$y,$z);
}else{
}
while (my ($id,$call,$oldtype,$coords,$tick) = $fleet->fetchrow()){
if($ND::DBH->do(q{UPDATE incomings SET shiptype = ? WHERE id = ?},undef,$type,$id) == 1){
}
while (my ($id,$call,$oldtype,$coords,$tick) = $fleet->fetchrow()){
if($ND::DBH->do(q{UPDATE incomings SET shiptype = ? WHERE id = ?},undef,$type,$id) == 1){
$ND::server->command("msg $ND::target Set fleet from $coords on call $call to $type (previously $oldtype)");
if ($tick < 0 && not (defined $x && $x eq 'call')){
$ND::server->command("msg $ND::target This call is old, did you use the call id, instead of inc id by accident? You can use .settypeall callid to set the type on all incs in a call.");
$ND::server->command("msg $ND::target Set fleet from $coords on call $call to $type (previously $oldtype)");
if ($tick < 0 && not (defined $x && $x eq 'call')){
$ND::server->command("msg $ND::target This call is old, did you use the call id, instead of inc id by accident? You can use .settypeall callid to set the type on all incs in a call.");
if ($ND::DBH->do(q{UPDATE calls SET dc = (SELECT uid FROM users WHERE hostmask ILIKE ?) WHERE id = ?}
,undef,$ND::address,$id) == 1){
$ND::server->command("msg $ND::target Updated the DC for call $id");
if ($ND::DBH->do(q{UPDATE calls SET dc = (SELECT uid FROM users WHERE hostmask ILIKE ?) WHERE id = ?}
,undef,$ND::address,$id) == 1){
$ND::server->command("msg $ND::target Updated the DC for call $id");
if($ND::DBH->do(q{UPDATE calls SET dc = (SELECT uid FROM users WHERE hostmask ILIKE ?), covered = TRUE, open = FALSE WHERE id = ?}
,undef,$ND::address,$id) == 1){
$ND::server->command("msg $ND::target Marked call $id as covered");
if($ND::DBH->do(q{UPDATE calls SET dc = (SELECT uid FROM users WHERE hostmask ILIKE ?), covered = TRUE, open = FALSE WHERE id = ?}
,undef,$ND::address,$id) == 1){
$ND::server->command("msg $ND::target Marked call $id as covered");
if($ND::DBH->do(q{UPDATE calls SET dc = (SELECT uid FROM users WHERE hostmask ILIKE ?), covered = FALSE, open = FALSE WHERE id = ?}
,undef,$ND::address,$id) == 1){
$ND::server->command("msg $ND::target Marked call $id as ignored");
if($ND::DBH->do(q{UPDATE calls SET dc = (SELECT uid FROM users WHERE hostmask ILIKE ?), covered = FALSE, open = FALSE WHERE id = ?}
,undef,$ND::address,$id) == 1){
$ND::server->command("msg $ND::target Marked call $id as ignored");