X-Git-Url: https://ruin.nu/git/?a=blobdiff_plain;f=Def.pm;h=9297e3c5b846f8b18e1caa7396c80aafeb96d8a8;hb=cc16b149738879697f5baf3eaede9597388d4d53;hp=acf8f57c7cc697c05b0354da38663309615ab297;hpb=46de469b2264dd5552b1f2c1c2606d58a2123964;p=NDIRC.git diff --git a/Def.pm b/Def.pm index acf8f57..9297e3c 100644 --- a/Def.pm +++ b/Def.pm @@ -82,7 +82,7 @@ sub setType { while (my ($id,$call,$oldtype,$coords,$tick) = $fleet->fetchrow()){ if($ND::DBH->do(q{UPDATE incomings SET shiptype = ? WHERE id = ?},undef,$type,$id) == 1){ log_message $user->{uid}, "DC set fleet: $id to: $type"; - $ND::server->command("msg $ND::target Set fleet from $coords on call $call to $type (previosly $oldtype)"); + $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."); } @@ -130,17 +130,19 @@ sub defcall { my $call = ""; if ($callnr){ my $st = $ND::DBH->prepare(q{ - SELECT c.landing_tick - (SELECT value::integer FROM misc WHERE id = 'TICK'), concat(i.shiptype||'/') AS shiptype, dc.username + SELECT c.landing_tick - (SELECT value::integer FROM misc WHERE id = 'TICK'), concat(i.shiptype||'/') AS shiptype, p.x FROM calls c JOIN incomings i ON i.call = c.id LEFT OUTER JOIN users dc ON dc.uid = c.dc + JOIN users u ON u.uid = c.member + JOIN current_planet_stats p ON u.planet = p.id WHERE not covered AND c.id = ? - GROUP BY c.id,c.landing_tick,dc.username + GROUP BY c.id,c.landing_tick,p.x ORDER BY c.landing_tick; }); if (my @row = $ND::DBH->selectrow_array($st,undef,$callnr)){ chop($row[1]); - $call = "(Anti $row[1] ETA: $row[0])" + $call = "(Anti $row[1] ETA: $row[0] Cluster: $row[2])" } } $ND::server->command("notice $ND::memchan DEFENSE REQUIRED!! WAKE UP!!");