From: Michael Andreen Date: Tue, 4 Sep 2007 20:27:23 +0000 (+0200) Subject: BUGFIX: apparently the new extra command arg broke things X-Git-Url: https://ruin.nu/git/?a=commitdiff_plain;h=f2a9f7a98baa00d8fdeb1b601b89a5742331ad24;hp=b232bb5a3520c656ac825a33328ecca76f1dd0f6;p=NDIRC.git BUGFIX: apparently the new extra command arg broke things --- 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; }