my ($target,$mess) = $msg =~ /^(\S+) (.*)$/ or die 'ARGS';
- $c->message("msg $target", "<b>$mess</b>");
- $c->message("msg ".$c->channel, "<c03>$target << $mess</c>");
+ $c->message(privmsg => $target, "<b>$mess</b>");
+ $c->message(privmsg => $c->channel, "<c03>$target << $mess</c>");
}
sub defcall
my $st = $dbh->prepare(q{
SELECT status
,c.landing_tick - (SELECT value::integer FROM misc WHERE id = 'TICK') AS eta
- ,concat(i.shiptype||'/') AS shiptype
+ ,array_to_string(array_agg(i.shiptype),'/') AS shiptype
FROM calls c
JOIN incomings i USING (call)
LEFT OUTER JOIN users dc ON dc.uid = c.dc
$c->reply("No call with id: $callnr");
return;
}
- chop($call->{shiptype});
$callinfo = "(Anti $call->{shiptype} ETA: $call->{eta})";
if($call->{status} eq 'Covered'){
$c->reply("Call <b>$callnr</b> $callinfo is covered.");
return;
}
}
- $c->message("notice $ND::memchan", "DEFENSE REQUIRED!! WAKE UP!!");
- $c->message("msg $ND::memchan", "DEFENSE REQUIRED $mess $callinfo MSG "
+ $c->message(notice => $ND::memchan, "DEFENSE REQUIRED!! WAKE UP!!");
+ $c->message(privmsg => $ND::memchan, "DEFENSE REQUIRED $mess $callinfo MSG "
.$c->nick." TO RESPOND");
}