X-Git-Url: https://ruin.nu/git/?a=blobdiff_plain;f=PA.pm;h=f085535c0edfed470c3ae32669b9b474ed4f2be2;hb=f8ae81b53b3edb30da430d26b1f161683f31c6f2;hp=5781ee73f2cb94e9d3b42852f5aad3ab2dd13bea;hpb=072942842fc723ede15dcf88efe19b0497e9cc27;p=NDIRC.git diff --git a/PA.pm b/PA.pm index 5781ee7..f085535 100644 --- a/PA.pm +++ b/PA.pm @@ -33,6 +33,7 @@ our @EXPORT = qw/checkPlanet checkGal shipEff shipStop parseValue prettyValue ca sub checkPlanet { my ($msg) = @_; + DB(); my ($x,$y,$z,$nick); if ($msg =~ /(\d+)\D+(\d+)\D+(\d+)/){ $x = $1; @@ -43,7 +44,6 @@ sub checkPlanet { }else{ $ND::server->command("notice $ND::target usage .p X:Y:Z".(officer() ? ' or .p nick' : '')); } - DB(); 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