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;
}
}else{
$dists = "DISTS UNKNOWN, ADD DEVSCAN"
}
- $c->message(privmsg => $c->disp->targets->{scan}
- ,"<b>$id</b> 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 =>
+ "<b>$id</b> 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{
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;
command addscan => {
help => q(syntax: .addscan list of scans),
+ type => q(universal),
}, class extends NDIRC::Command {
method execute($c,$msg) {
my $dbh = $c->model;
INSERT INTO scans (scan_id,tick,groupscan,uid) VALUES (LOWER($1),tick(),$2,COALESCE($3,-1))
});
my $user = $dbh->selectrow_hashref(q{SELECT uid,username, scan_points, tick()
- FROM users WHERE uid = ? },undef,$c->uid);
+ FROM users WHERE uid = ? AND uid > 0 },undef,$c->uid);
my $groupscans = 0;
my $scans = 0;
eval {