]> ruin.nu Git - NDIRC.git/commitdiff
BUGFIX: apparently the new extra command arg broke things
authorMichael Andreen <harv@ruin.nu>
Tue, 4 Sep 2007 20:27:23 +0000 (22:27 +0200)
committerMichael Andreen <harv@ruin.nu>
Tue, 4 Sep 2007 20:27:23 +0000 (22:27 +0200)
PA.pm

diff --git a/PA.pm b/PA.pm
index c55d2cf6b28b4a5ac5923d8f2518437cd5aa172d..6319f1765ad1811acaf716efe14c943cfa7a60f7 100644 (file)
--- 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;
        }