]> git.donarmstrong.com Git - infobot.git/commitdiff
only sort the random ones
authortimriker <timriker@c11ca15a-4712-0410-83d8-924469b57eb5>
Thu, 1 Jul 2004 15:49:17 +0000 (15:49 +0000)
committertimriker <timriker@c11ca15a-4712-0410-83d8-924469b57eb5>
Thu, 1 Jul 2004 15:49:17 +0000 (15:49 +0000)
git-svn-id: https://svn.code.sf.net/p/infobot/code/trunk/blootbot@977 c11ca15a-4712-0410-83d8-924469b57eb5

src/Misc.pl

index 45bfab9b131fe5e5be0fa7f366bf46b8ab51152a..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";