X-Git-Url: https://ruin.nu/git/?a=blobdiff_plain;f=Commands%2FScans.pm;h=ed0def8dc5af3bd3adfafe4c23497ac377b41ea2;hb=5f3e2c69d303e9196a76dd10607b595cac6658a8;hp=70420e9a33d100492b24f029bafe1cb71bf37052;hpb=b87b6e87c3959096739e54bdf95c23d9e8212145;p=NDIRC.git diff --git a/Commands/Scans.pm b/Commands/Scans.pm index 70420e9..ed0def8 100644 --- a/Commands/Scans.pm +++ b/Commands/Scans.pm @@ -54,6 +54,10 @@ sub gs my $planet = $c->model->selectrow_array(q{SELECT planetid($1,$2,$3,tick())} ,undef,$x,$y,$z); + unless ($planet){ + $c->reply("There is no planet with coords $x:$y:$z, try again after the tick."); + return; + } my $query = $c->model->prepare(q{SELECT scan_id FROM scans @@ -194,9 +198,11 @@ sub anon my ($self, $c, $msg) = @_; my ($target,$mess) = $msg =~ /^(\S+) (.*)$/ or die 'ARGS'; - $c->message("msg $target", "$mess (reply with /msg $ND::scanchan)"); - $c->message("msg $ND::scanchan", "$target << $mess"); + $c->message("msg $target", "$mess (reply with /msg " + .$c->channel.")"); + $c->message("msg ".$c->channel, "$target << $mess"); } + sub addscan : Help(syntax: .addscan list of scans) {