X-Git-Url: https://ruin.nu/git/?p=NDIRC.git;a=blobdiff_plain;f=Commands%2FDef.pm;h=b115dd44be93aefc3cdcdc315e34fa02a88302fb;hp=321697871bc4113e2cb2fd5ea0b45bac829c4295;hb=5f2c0808b406a1c97a4cf07d1c7c51d574b4a6f6;hpb=a4667cce6415476312d6932f92f89fb28101ab88 diff --git a/Commands/Def.pm b/Commands/Def.pm index 3216978..b115dd4 100644 --- a/Commands/Def.pm +++ b/Commands/Def.pm @@ -226,7 +226,8 @@ SELECT calc FROM calls WHERE id = $1} } sub report_incs - : Type(pm) + : Help(Used to report incs, same as pasting in pm. Use ~ prefix to send output to channel) + : Type(def) { my ($self,$c,$msg) = @_; @@ -288,33 +289,33 @@ INSERT INTO incomings (call,pid,eta,amount,fleet) VALUES(?,?,?,?,?) RETURNING in },undef,$call[0],$attacker[2],$9,$amount,$7); @attacker = map (valuecolor(0),@attacker); if (! $threefleeter || $call[2]){ - $c->message(privmsg => $ND::defchan, "New incoming: CallId: $call[0], IncId: $incid $1:$2:$3 ($user->{defprio}) is under Attack by $4:$5:$6, ($attacker[3]), $attacker[1]($attacker[4]) https://nd.ruin.nu/calls/edit/$call[0]"); + $c->reply("New incoming: CallId: $call[0], IncId: $incid $1:$2:$3 ($user->{defprio}) is under Attack by $4:$5:$6, ($attacker[3]), $attacker[1]($attacker[4]) https://nd.ruin.nu/calls/edit/$call[0]"); }else{ - $c->message(privmsg => $ND::defchan, "Do not cover, NoDef member is under attack by $4:$5:$6, ($attacker[3]), $attacker[1]($attacker[4]) https://nd.ruin.nu/calls/edit/$call[0]"); + $c->reply("Do not cover, NoDef member is under attack by $4:$5:$6, ($attacker[3]), $attacker[1]($attacker[4]) https://nd.ruin.nu/calls/edit/$call[0]"); } $dbh->do(q{UPDATE planets SET hit_us = hit_us + 1 WHERE pid = ?},undef,$attacker[2]); if ($call[1] eq 'Covered'){ $dbh->do(q{UPDATE calls SET status = 'Open' WHERE call = ?},undef,$call[0]); - $c->message(privmsg => $ND::defchan, "Call is likely not covered anymore, please recalc! calc: $call[3]"); + $c->reply("Call is likely not covered anymore, please recalc! calc: $call[3]"); } }else{ @attacker = map (valuecolor(0),@attacker); - $c->message(privmsg => $ND::defchan, "Duplicate call: Callid: $call[0], Covered: $call[1], Open: $call[2] $1:$2:$3 ($user->{defprio}) is under Attack by $4:$5:$6, ($attacker[3]), $attacker[1]($attacker[4]), landing tick: $landing_tick"); + $c->reply("Duplicate call: Callid: $call[0], Covered: $call[1], Open: $call[2] $1:$2:$3 ($user->{defprio}) is under Attack by $4:$5:$6, ($attacker[3]), $attacker[1]($attacker[4]), landing tick: $landing_tick"); } my ($fleetcatch) = $dbh->selectrow_array(q{ SELECT count(*) FROM launch_confirmations WHERE uid = ? AND back = ? },undef,$user->{uid},$landing_tick); if ($fleetcatch > 0){ - $c->message(privmsg => $ND::defchan, "THIS IS A POSSIBLE FLEETCATCH!"); + $c->reply("THIS IS A POSSIBLE FLEETCATCH!"); } } $dbh->commit; }else{ - $c->message(privmsg => $ND::defchan, "Didn't find any planet with coordinates $4:$5:$6 at this tick"); + $c->reply("Didn't find any planet with coordinates $4:$5:$6 at this tick"); } }else{ - $c->message(privmsg => $ND::defchan, "No member registered with coordinates $1:$2:$3"); + $c->reply("No member registered with coordinates $1:$2:$3"); } }