]> ruin.nu Git - NDIRC.git/blobdiff - PA.pm
Converted the .p command
[NDIRC.git] / PA.pm
diff --git a/PA.pm b/PA.pm
index 6c39098a874249213da80824b51c70cfd49d5455..04cf743386feaa8847b9415721d276f3f67fed30 100644 (file)
--- a/PA.pm
+++ b/PA.pm
@@ -28,40 +28,8 @@ require Exporter;
 
 our @ISA = qw/Exporter/;
 
-our @EXPORT = qw/checkPlanet checkGal shipEff shipStop parseValue prettyValue calcXp findCovOpper tick_time/;
+our @EXPORT = qw/checkGal shipEff shipStop parseValue prettyValue calcXp findCovOpper tick_time/;
 
-sub checkPlanet {
-       my ($msg) = @_;
-
-       my ($x,$y,$z,$nick);
-       if ($msg =~ /(\d+)\D+(\d+)\D+(\d+)/){
-               $x = $1;
-               $y = $2;
-               $z = $3;
-       }elsif ((officer() || ia() || intel()) && defined $msg){
-               $nick = $msg;
-       }else{
-               $ND::server->command("notice $ND::nick usage .p X:Y:Z".(officer() || ia() ? ' or .p nick' : ''));
-               return;
-       }
-       my $f = $ND::DBH->prepare(q{SELECT coords(x,y,z),ruler,planet,race,score,size,value,scorerank,sizerank,
-               valuerank, xp, xprank, alliance, relationship, nick, planet_status, hit_us, channel
-               FROM current_planet_stats WHERE (x = $1 AND y = $2 and z = $3) OR nick ILIKE $4 LIMIT 1
-       });
-       $f->execute($x,$y,$z,$nick);
-       if (my $planet = $f->fetchrow_hashref()){
-               for (keys %{$planet}){
-                       $planet->{$_} = valuecolor(1,$planet->{$_});
-               }
-               my $ally = "";
-               if (officer() || ia() || dc() || intel()){
-                       $ally = "Alliance=$planet->{alliance} ($planet->{relationship}), Nick=$planet->{nick} ($planet->{planet_status}), Channel: $planet->{channel}, Hostile Count: $planet->{hit_us},";
-               }
-               $ND::server->command("notice $ND::nick $planet->{coords} $planet->{ruler} OF $planet->{planet},$ally Race=$planet->{race}, Score=$planet->{score} ($planet->{scorerank}), Size=$planet->{size} ($planet->{sizerank}), Value=$planet->{value} ($planet->{valuerank}), XP=$planet->{xp} ($planet->{xprank})");
-       }else{
-               $ND::server->command("notice $ND::nick Couldn't find planet: $msg");
-       }
-}
 sub checkGal {
        my ($msg) = @_;