X-Git-Url: https://git.sommitrealweird.co.uk/twirssi-net-twitter-lite.git/blobdiff_plain/c8399f922b5a6dd2b5ec20f3820d3cb8b58c1004..b57f2ca6b9d2113fe5d981229b2191ba6757b532:/twirssi.pl diff --git a/twirssi.pl b/twirssi.pl index 8d5b813..0d4c1e5 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: 521 $' =~ /(\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:50:54 -0800 (Sat, 07 Mar 2009) $', ); my $window; @@ -738,7 +738,7 @@ sub do_updates { $context->{id}, $username, $context->{user}{screen_name}, $ctext; if ($context->{truncated}) { - printf $fh "id:%d account:%s nick:%s type:ellispis %s\n", + printf $fh "id:%s account:%s nick:%s type:ellispis %s\n", $context->{id}."-url", $username, $context->{user}{screen_name}, "http://twitter.com/$context->{user}{screen_name}/status/$context->{id}"; @@ -758,7 +758,7 @@ sub do_updates { printf $fh "id:%d account:%s nick:%s type:%s %s\n", $t->{id}, $username, $t->{user}{screen_name}, $reply, $text; if ($t->{truncated}) { - printf $fh "id:%d account:%s nick:%s type:ellispis %s\n", + printf $fh "id:%s account:%s nick:%s type:ellispis %s\n", $t->{id}."-url", $username, $t->{user}{screen_name}, "http://twitter.com/$t->{user}{screen_name}/status/$t->{id}"; @@ -785,7 +785,7 @@ sub do_updates { printf $fh "id:%d account:%s nick:%s type:tweet %s\n", $t->{id}, $username, $t->{user}{screen_name}, $text; if ($t->{truncated}) { - printf $fh "id:%d account:%s nick:%s type:ellispis %s\n", + printf $fh "id:%s account:%s nick:%s type:ellispis %s\n", $t->{id}."-url", $username, $t->{user}{screen_name}, "http://twitter.com/$t->{user}{screen_name}/status/$t->{id}"; @@ -929,6 +929,12 @@ sub monitor_child { ( MSGLEVEL_PUBLIC | $hilight ), $meta{type}, $account, $meta{nick}, $marker, $_ ]; + } elsif ( $meta{type} eq 'ellispis' ) { + push @lines, + [ + MSGLEVEL_PUBLIC, + "tweet", $account, $meta{nick}, "", $_ + ]; } elsif ( $meta{type} eq 'search' ) { push @lines, [ @@ -1145,8 +1151,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