From: Dan Boger Date: Sat, 7 Mar 2009 21:32:09 +0000 (-0800) Subject: r520 - Sort /reply tab-completions by last tweet time X-Git-Url: https://git.sommitrealweird.co.uk/twirssi-net-twitter-lite.git/commitdiff_plain/f8ceb4b4ec4256d125e26563fb2396e1d118a6cd?hp=c8399f922b5a6dd2b5ec20f3820d3cb8b58c1004 r520 - Sort /reply tab-completions by last tweet time --- diff --git a/twirssi.pl b/twirssi.pl index 8d5b813..5783d33 100644 --- a/twirssi.pl +++ b/twirssi.pl @@ -12,7 +12,7 @@ $Data::Dumper::Indent = 1; use vars qw($VERSION %IRSSI); $VERSION = "2.1.2beta"; -my ($REV) = '$Rev: 519 $' =~ /(\d+)/; +my ($REV) = '$Rev: 520 $' =~ /(\d+)/; %IRSSI = ( authors => 'Dan Boger', contact => 'zigdon@gmail.com', @@ -21,7 +21,7 @@ my ($REV) = '$Rev: 519 $' =~ /(\d+)/; . 'Can optionally set your bitlbee /away message to same', license => 'GNU GPL v2', url => 'http://twirssi.com', - changed => '$Date: 2009-03-07 13:30:43 -0800 (Sat, 07 Mar 2009) $', + changed => '$Date: 2009-03-07 13:31:54 -0800 (Sat, 07 Mar 2009) $', ); my $window; @@ -1145,8 +1145,10 @@ sub sig_complete { ) { # /twitter_reply gets a nick:num $word =~ s/^@//; - @$complist = map { "$_:$id_map{__indexes}{$_}" } grep /^\Q$word/i, - sort keys %{ $id_map{__indexes} }; + @$complist = map { "$_:$id_map{__indexes}{$_}" } + sort {$nicks{$b} <=> $nicks{$a}} + grep /^\Q$word/i, + keys %{ $id_map{__indexes} }; } # /tweet, /tweet_as, /dm, /dm_as - complete @nicks (and nicks as the first