]> ruin.nu Git - ndwebbie.git/blobdiff - ND/IRC/PA.pm
moved functions to include file
[ndwebbie.git] / ND / IRC / PA.pm
index fbe2a8457de9ddd22f44ee1296dfaa66fbed5e69..f1444a247f5610cbcd10351f80f65e624b7e899f 100644 (file)
@@ -20,6 +20,7 @@ package ND::IRC::PA;
 use strict;
 use warnings;
 use ND::DB;
+use ND::Include;
 use ND::IRC::Access;
 use ND::IRC::Misc;
 use POSIX;
@@ -138,39 +139,6 @@ FROM ship_stats WHERE name ILIKE ?
        #print $text;
 }
 
-sub parseValue {
-       if (defined $_[0] && $_[0] =~ /^(-?\d+(?:\.\d+)?)([khMG])?$/){
-               return $1 unless defined $2;
-               return $1*100 if $2 eq 'h';
-               return $1*1000 if $2 eq 'k';
-               return $1*1000000 if $2 eq 'M';
-               return $1*1000000000 if $2 eq 'G';
-       }
-       return $_[0];
-}
-
-sub prettyValue {
-       my ($value) = @_;
-       my $unit = '';
-       my @units = ('k','M','G','T');
-       for (my $i = 0; $value >= 1000;$i++){
-               $value /= 1000;
-               $unit = $units[$i];
-       }
-       return sprintf('%.2f%s', $value,$unit);
-}
-
-
-sub min {
-       my ($x,$y) = @_;
-       return ($x > $y ? $y : $x);
-}
-
-sub max {
-       my ($x,$y) = @_;
-       return ($x < $y ? $y : $x);
-}
-
 sub calcXp {
        my ($x,$y,$z,$roids) = @_;