X-Git-Url: https://ruin.nu/git/?a=blobdiff_plain;f=Commands%2FDef.pm;h=c50f864b1dda054eefed8293b97302fcef8dca5e;hb=468a4e3e07c0d9e6ed66a75c73f0d7ff2921b90a;hp=bdfc6776c9beaba28722f790246f886b40aea2e8;hpb=be6e9d0c7e6b2d13127b1f3be2d482a8da6a6339;p=NDIRC.git
diff --git a/Commands/Def.pm b/Commands/Def.pm
index bdfc677..c50f864 100644
--- a/Commands/Def.pm
+++ b/Commands/Def.pm
@@ -25,20 +25,6 @@ use feature ':5.10';
use MooseX::Declare;
use NDIRC::Dispatcher;
-command anon => {
- help => q(syntax: .anon nick message),
- type => q(def),
- acl => q(irc_anondef),
-}, class extends NDIRC::Command {
- method execute($c,$msg) {
-
- my ($target,$mess) = $msg =~ /^(\S+) (.*)$/ or die 'ARGS';
-
- $c->message(privmsg => $target, "$mess");
- $c->message(privmsg => $c->channel, "$target << $mess");
- }
-};
-
command defcall => {
help => q(syntax: .defcall [callid] | if a call id is given, then shiptypes and eta will be fetched from the database and added to the message),
type => q(def),
@@ -72,9 +58,8 @@ ORDER BY c.landing_tick;
return;
}
}
- $c->message(notice => $c->disp->targets->{members}, "DEFENSE REQUIRED!! WAKE UP!!");
- $c->message(privmsg => $c->disp->targets->{members}, "DEFENSE REQUIRED "
- ."$mess $callinfo MSG ".$c->nick." TO RESPOND");
+ $c->bot->toTarget(members => "DEFENSE REQUIRED "
+ ."$mess $callinfo RESPOND TO ".$c->username);
}
};
@@ -236,7 +221,7 @@ command report_incs => {
use Try::Tiny;
method execute($c,$msg) {
- $msg =~ /(\d+):(\d+):(\d+)\*?\s+(\d+):(\d+):(\d+)\s+([^:]*\S+)\s+(?:Ter|Cat|Xan|Zik|Etd)\s+([\d,]+)\s+Attack\s+(\d+)/
+ $msg =~ /(\d+):(\d+):(\d+)\*?\s+(\d+):(\d+):(\d+)\s+([^:]*\S+)\s+(?:Ter|Cat|Xan|Zik|Etd)\s+([\d,]+)\s+(?:Attack\s+)?(\d+)/
|| $msg =~ /(\d+):(\d+):(\d+)\s+(\d+):(\d+):(\d+)\s+\((?:Ter|Cat|Xan|Zik|Etd)\)\s+([^,]*\S+)\s+([\d,]+)\s+(\d+)\s+\(\d+\)/
or return;
my $dbh = $c->model;