X-Git-Url: https://ruin.nu/git/?p=NDIRC.git;a=blobdiff_plain;f=Commands%2FMembers.pm;h=960728904c05feea288bba004d1757a5c0a231ec;hp=b1f4da9a998bf8aa083a829063810a8c1ff1d18a;hb=a7e034b3599d41cdf5a158b14bd1715451f89a0c;hpb=87ddd7d37d6f5880757a71bfedd3459f4a511d2b diff --git a/Commands/Members.pm b/Commands/Members.pm index b1f4da9..9607289 100644 --- a/Commands/Members.pm +++ b/Commands/Members.pm @@ -80,7 +80,7 @@ sub points { my ($self,$c,$msg) = @_; my $f; - my $nick = $c->host; + my $nick = $c->uid; if ($msg =~ /(\S+)/ && $c->check_user_roles(qw/irc_points_others/)){ $nick = $1; $f = $c->model->prepare(q{ @@ -90,7 +90,7 @@ FROM users WHERE username ILIKE ? LIMIT 5 }else{ $f = $c->model->prepare(q{ SELECT username, attack_points, defense_points, scan_points, humor_points -FROM users WHERE hostmask ILIKE ? +FROM users WHERE uid = ? }); } $f->execute($nick); @@ -138,8 +138,8 @@ SELECT uid,username FROM users WHERE username ILIKE ? }, undef, $1); }else{ $user = $dbh->selectrow_hashref(q{ -SELECT uid,username FROM users WHERE hostmask ILIKE ? - }, undef, $c->host); +SELECT uid,username FROM users WHERE uid = ? + }, undef, $c->uid); } if ($user){ my $unread = $dbh->selectrow_hashref(q{SELECT * FROM unread_posts($1)},undef,$user->{uid});