]> git.donarmstrong.com Git - infobot.git/blobdiff - blootbot/src/Misc.pl
only sort the random ones
[infobot.git] / blootbot / src / Misc.pl
index 10609fe1da4f4b7860959bcfe5c6f0b136e3c365..9b6240aa1aca829ee03c666ce3ad8038be7f3a73 100644 (file)
@@ -131,14 +131,13 @@ sub formListReply {
            push(@rand, $list[$_]);
            last if (scalar @rand == $maxshow);
        }
-       @list = @rand;
+       @list = sort @rand;
     } elsif ($total > $maxshow) {
        &status("formListReply: truncating list.");
 
        @list = @list[0..$maxshow-1];
     }
 
-    @list = sort @list;
     # form the reply.
     while () {
        $reply  = $prefix ."(\002". scalar(@list). "\002 shown";
@@ -375,7 +374,7 @@ sub getRandomInt {
        my $i = $1;
        my $fuzzy = int(rand 5);
        if ($i < 10) {
-           return $i*60;
+           return $i;
        }
        if (rand > 0.5) {
            return ($i - $fuzzy)*60;