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, "<b>$mess</b>");
- $c->message(privmsg => $c->channel, "<c03>$target << $mess</c>");
- }
-};
-
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),
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;