X-Git-Url: https://ruin.nu/git/?a=blobdiff_plain;f=ND%2FIRC%2FPA.pm;h=f085535c0edfed470c3ae32669b9b474ed4f2be2;hb=526baae16afa212db07376e3450767ce7347575c;hp=5781ee73f2cb94e9d3b42852f5aad3ab2dd13bea;hpb=1221916e01a1aa0683a0a914c8dcabd2e0b56312;p=ndwebbie.git diff --git a/ND/IRC/PA.pm b/ND/IRC/PA.pm index 5781ee7..f085535 100644 --- a/ND/IRC/PA.pm +++ b/ND/IRC/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