X-Git-Url: https://ruin.nu/git/?a=blobdiff_plain;f=Commands%2FDef.pm;h=e13758d4797964e6bdd0d8293c8f101c1a0717b8;hb=e8c94cdebefdc428ea92fde6db63f18d3e8399b2;hp=1731689e12689e673d06cec3e0d1543e9acbb80c;hpb=ae37bc6b64270f8c65298a36fce1f4bad761231f;p=NDIRC.git diff --git a/Commands/Def.pm b/Commands/Def.pm index 1731689..e13758d 100644 --- a/Commands/Def.pm +++ b/Commands/Def.pm @@ -37,8 +37,8 @@ sub anon my ($target,$mess) = $msg =~ /^(\S+) (.*)$/ or die 'ARGS'; - $c->message("msg $target", "$mess"); - $c->message("msg ".$c->channel, "$target << $mess"); + $c->message(privmsg => $target, "$mess"); + $c->message(privmsg => $c->channel, "$target << $mess"); } sub defcall @@ -55,7 +55,7 @@ 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 @@ -68,15 +68,14 @@ ORDER BY c.landing_tick; $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 $callnr $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"); }