X-Git-Url: https://git.sommitrealweird.co.uk/twirssi-net-twitter-lite.git/blobdiff_plain/f8ceb4b4ec4256d125e26563fb2396e1d118a6cd..c119e650820fc03f4ffa5d6ecfe5c1a1332bd7d5:/twirssi.pl diff --git a/twirssi.pl b/twirssi.pl index 5783d33..3cb6df8 100644 --- a/twirssi.pl +++ b/twirssi.pl @@ -11,8 +11,8 @@ $Data::Dumper::Indent = 1; use vars qw($VERSION %IRSSI); -$VERSION = "2.1.2beta"; -my ($REV) = '$Rev: 520 $' =~ /(\d+)/; +$VERSION = "2.1.2"; +my ($REV) = '$Rev: 523 $' =~ /(\d+)/; %IRSSI = ( authors => 'Dan Boger', contact => 'zigdon@gmail.com', @@ -21,7 +21,7 @@ my ($REV) = '$Rev: 520 $' =~ /(\d+)/; . 'Can optionally set your bitlbee /away message to same', license => 'GNU GPL v2', url => 'http://twirssi.com', - changed => '$Date: 2009-03-07 13:31:54 -0800 (Sat, 07 Mar 2009) $', + changed => '$Date: 2009-03-07 14:09:03 -0800 (Sat, 07 Mar 2009) $', ); my $window; @@ -354,14 +354,26 @@ sub cmd_login { { 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; @@ -738,7 +750,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 +770,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 +797,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 +941,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, [