]> git.donarmstrong.com Git - infobot.git/blobdiff - src/Misc.pl
sort mini-list
[infobot.git] / src / Misc.pl
index 295d45ed0bbd1e4b8c8693c7fa51222ee5bb1b1d..10609fe1da4f4b7860959bcfe5c6f0b136e3c365 100644 (file)
@@ -138,11 +138,12 @@ sub formListReply {
        @list = @list[0..$maxshow-1];
     }
 
+    @list = sort @list;
     # form the reply.
     while () {
        $reply  = $prefix ."(\002". scalar(@list). "\002 shown";
        $reply .= "; \002$total\002 total" if ($total != scalar @list);
-       $reply .= "): ". join(" \002;;\002 ",@list) .".";
+       $reply .= "): ". join(" \002;;\002 ", @list) .".";
 
        last if (length($reply) < $maxlen and scalar(@list) <= $maxshow);
        last if (scalar(@list) == 1);