- addPoints($c, 'attack', $nick, $points);
-}
-
-sub d
- : Help(Usage: .d username [points] | % can be used for wildcards %arro% will match barrow, if the number of points isn't specified, then 1 will be assumed.)
- : ACL(irc_d)
- : Type(def)
-{
- my ($self,$c,$msg) = @_;
- my ($nick,$points) = $msg =~ /^(\S+)(?: (-?(:?\d+|\d*\.\d+)))?$/ or die 'ARGS';
-
- addPoints($c, 'defense', $nick, $points);
-}
-
-sub s
- : Help(Usage: .s username [points] | % can be used for wildcards %arro% will match barrow, if the number of points isn't specified, then 1 will be assumed.)
- : ACL(irc_s)
-{
- my ($self,$c,$msg) = @_;
- my ($nick,$points) = $msg =~ /^(\S+)(?: (-?(:?\d+|\d*\.\d+)))?$/ or die 'ARGS';
-
- addPoints($c, 'scan', $nick, $points);
-}
-
-sub h
- : Help(Usage: .h username [points] | % can be used for wildcards %arro% will match barrow, if the number of points isn't specified, then 1 will be assumed.)
- : ACL(irc_h)
-{
- my ($self,$c,$msg) = @_;
- my ($nick,$points) = $msg =~ /^(\S+)(?: (-?(:?\d+|\d*\.\d+)))?$/ or die 'ARGS';
-
- addPoints($c, 'humor', $nick, $points);
-}
-
-sub addPoints {
- my ($c,$type, $nick, $points) = @_;
- $points //= 1;
-
- my $dbh = $c->model;
+};
+
+command d => {
+ help => q(Usage: .d username [points] | % can be used for wildcards %arro% will match barrow, if the number of points isn't specified, then 1 will be assumed.),
+ acl => q(irc_d),
+ point => 'defense',
+ type => q(def)
+}, $points;
+
+command s => {
+ help => q(Usage: .s username [points] | % can be used for wildcards %arro% will match barrow, if the number of points isn't specified, then 1 will be assumed.),
+ point => 'scan',
+ acl => q(irc_s),
+}, $points;
+
+command h => {
+ help => q(Usage: .h username [points] | % can be used for wildcards %arro% will match barrow, if the number of points isn't specified, then 1 will be assumed.),
+ point => 'humor',
+ acl => q(irc_h),
+}, $points;
+
+command getanti => {
+ help => q(Usage: .getanti class [eta] | class is the target class, like fi or bs, eta is optional max eta for the ships.),
+ acl => q(irc_getships),
+}, class extends NDIRC::Command {
+ method execute ($c,$msg) {
+ my ($class,$eta) = $msg =~ /^(\S+)(?: (\d+))?$/ or die 'ARGS';
+ my $dbh = $c->model;
+
+ $eta //= 9;
+
+ my @classes = qw/Fi Co Fr De Cr Bs/;
+ for (@classes){
+ if (lc $class eq lc $_){
+ $class = $_;
+ last;
+ }
+ }