]> ruin.nu Git - NDIRC.git/blobdiff - Commands/PA.pm
Introduce a uid member for the context and use it intead of the host in commands
[NDIRC.git] / Commands / PA.pm
index 2dcb00671d0c90ccc3355f138606ffd50ce7100d..52fb3a007a1241c3cdc9e234f3c244cc3defde45 100644 (file)
@@ -126,8 +126,8 @@ sub xp
 
        my ($avalue,$ascore) = $c->model->selectrow_array(q{
 SELECT value,score FROM current_planet_stats
-WHERE pid = (SELECT pid FROM users WHERE hostmask ILIKE ?)
-               }, undef, $c->host);
+WHERE pid = (SELECT pid FROM users WHERE uid = ?)
+               }, undef, $c->uid);
        my ($tvalue,$tscore,$tsize) = $c->model->selectrow_array(q{
 SELECT value,score,size FROM current_planet_stats
 WHERE x = ? AND y = ? and z = ?
@@ -167,8 +167,8 @@ sub fco
 
        my ($value,$score) = $c->model->selectrow_array(q{
 SELECT value,score FROM planet_stats WHERE tick = $2 AND
-       pid = (SELECT pid FROM users WHERE hostmask ILIKE $1)
-               }, undef, $c->host,$tick);
+       pid = (SELECT pid FROM users WHERE uid = $1)
+               }, undef, $c->uid,$tick);
        unless ($value){
                $c->reply("You don't have a planet registered.");
                return;