From: timriker Date: Thu, 1 Jul 2004 15:49:17 +0000 (+0000) Subject: only sort the random ones X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=f73d564ddc0284bf938e641b31742d39ae9c17e6;p=infobot.git only sort the random ones git-svn-id: https://svn.code.sf.net/p/infobot/code/trunk@977 c11ca15a-4712-0410-83d8-924469b57eb5 --- diff --git a/blootbot/src/Misc.pl b/blootbot/src/Misc.pl index 45bfab9..9b6240a 100644 --- a/blootbot/src/Misc.pl +++ b/blootbot/src/Misc.pl @@ -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";