X-Git-Url: https://ruin.nu/git/?a=blobdiff_plain;f=PA.pm;h=6319f1765ad1811acaf716efe14c943cfa7a60f7;hb=f2a9f7a98baa00d8fdeb1b601b89a5742331ad24;hp=c55d2cf6b28b4a5ac5923d8f2518437cd5aa172d;hpb=b232bb5a3520c656ac825a33328ecca76f1dd0f6;p=NDIRC.git diff --git a/PA.pm b/PA.pm index c55d2cf..6319f17 100644 --- a/PA.pm +++ b/PA.pm @@ -81,10 +81,10 @@ sub checkGal { } sub shipEff { - my ($msg,$value) = @_; - my ($amount,$ship); + my ($msg,$command) = @_; + my ($amount,$ship,$value); if($msg =~ /^(-?\d+(?:\.\d+)?[hkMG]?) (\w+)$/){ - if (defined $value){ + if ($command eq 'veff'){ $value = parseValue($1); $value *= -1.5 if $value < 0; my $feud = ''; @@ -93,7 +93,6 @@ sub shipEff { } $ship = "\%$2\%"; }else{ - my $command = (defined $value ? "veff" : "eff"); $ND::server->command("notice $ND::nick syntax: .$command amount ship"); return; } @@ -139,10 +138,10 @@ FROM ship_stats WHERE name ILIKE ? } sub shipStop { - my ($msg,$value) = @_; - my ($amount,$ship); + my ($msg,$command) = @_; + my ($amount,$ship,$value); if($msg =~ /^(-?\d+(?:\.\d+)?[hkMG]?) (\w+)$/){ - if (defined $value){ + if ($command eq 'vstop'){ $value = parseValue($1); $value *= -1.5 if $value < 0; my $feud = ''; @@ -151,7 +150,6 @@ sub shipStop { } $ship = "\%$2\%"; }else{ - my $command = (defined $value ? "vstop" : "stop"); $ND::server->command("notice $ND::nick syntax: .$command amount ship"); return; }