X-Git-Url: https://ruin.nu/git/?p=NDIRC.git;a=blobdiff_plain;f=Commands%2FScans.pm;h=319e38cfef6eded49488b59bd855bff36f3414f9;hp=8ea51ffc4b1fa89a775157f0ee775c8642db0f90;hb=dcb7d5ee3791ae43e7fcaf3639ce5b70f6c659ab;hpb=8211693b922ad772efc64463431f667d3baaceea diff --git a/Commands/Scans.pm b/Commands/Scans.pm index 8ea51ff..319e38c 100644 --- a/Commands/Scans.pm +++ b/Commands/Scans.pm @@ -83,14 +83,14 @@ WHERE uid = $1 UPDATE scan_requests SET nick = $1, tick = tick(), time = NOW() WHERE id = $2 }); - $req->execute($c->nick,$scan->{id}); + $req->execute($c->replyId,$scan->{id}); $id = $scan->{id}; }else{ $req = $c->model->prepare(q{ INSERT INTO scan_requests (uid,nick,pid,type) VALUES($1,$2,$3,$4) RETURNING (id) }); - $req->execute($c->uid,$c->nick,$planet,$type); + $req->execute($c->uid,$c->replyId,$planet,$type); $id = $req->fetchrow; } @@ -100,9 +100,9 @@ VALUES($1,$2,$3,$4) RETURNING (id) }else{ $dists = "DISTS UNKNOWN, ADD DEVSCAN" } - $c->message(privmsg => $c->disp->targets->{scan} - ,"$id http://game.planetarion.com/waves.pl?id=$typeid&x=$x&y=$y&z=$z" - . " ($x:$y:$z $type - $dists) | <".$c->nick."> $msg" + $c->bot->toTarget( scan => + "$id http://game.planetarion.com/waves.pl?id=$typeid&x=$x&y=$y&z=$z" + . " ($x:$y:$z $type - $dists) | <".$c->username."> $msg" ); $c->reply("sent request ($x:$y:$z $type)"); }else{ @@ -121,6 +121,7 @@ my %scantypes; command scanreqs => { help => q(syntax: .scanreqs [-pdunja] | Lists scan requests that haven't been handled. The argument can be used to omit types you don't have, like .scanreqs -ja to list all requests except jumpgates and advanced unit scans.), acl => q(irc_scanreqs), + type => q{scan}, }, class extends NDIRC::Command { method execute($c,$msg) { my @notype;