use vars qw($VERSION %IRSSI);
$VERSION = "2.1.2beta";
-my ($REV) = '$Rev: 499 $' =~ /(\d+)/;
+my ($REV) = '$Rev: 522 $' =~ /(\d+)/;
%IRSSI = (
authors => 'Dan Boger',
contact => 'zigdon@gmail.com',
. 'Can optionally set your bitlbee /away message to same',
license => 'GNU GPL v2',
url => 'http://twirssi.com',
- changed => '$Date: 2009-03-02 12:51:50 -0800 (Mon, 02 Mar 2009) $',
+ changed => '$Date: 2009-03-07 14:07:25 -0800 (Sat, 07 Mar 2009) $',
);
my $window;
{
my @user = split /\s*,\s*/, $autouser;
my @pass = split /\s*,\s*/, $autopass;
- if ( @user != @pass ) {
+
+ # if a password ends with a '\', it was meant to escape the comma, and
+ # it should be concatinated with the next one
+ my @unescaped;
+ while (@pass) {
+ my $p = shift @pass;
+ while ($p =~ /\\$/ and @pass) {
+ $p .= ",". shift @pass;
+ }
+ push @unescaped, $p;
+ }
+
+ if ( @user != @unescaped ) {
¬ice("Number of usernames doesn't match "
. "the number of passwords - auto-login failed" );
} else {
my ( $u, $p );
- while ( @user and @pass ) {
+ while ( @user and @unescaped ) {
$u = shift @user;
- $p = shift @pass;
+ $p = shift @unescaped;
&cmd_login("$u $p");
}
return;
printf $fh "id:%d account:%s nick:%s type:tweet %s\n",
$context->{id}, $username,
$context->{user}{screen_name}, $ctext;
+ if ($context->{truncated}) {
+ 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}";
+ }
$reply = "reply";
} elsif ($@) {
print $fh "type:debug request to get context failed: $@";
and not Irssi::settings_get_bool("show_own_tweets");
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:%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}";
+ }
}
print scalar localtime, " - Polling for replies" if &debug;
$text = &hilight($text);
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:%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}";
+ }
}
print scalar localtime, " - Polling for DMs" if &debug;
( 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,
[
)
{ # /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