projects
/
twirssi-net-twitter-lite.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
b57f2ca
)
r522 - Allow escaping commas in the twitter_password variables
author
Dan Boger
<zigdon@irc.peeron.com>
Sat, 7 Mar 2009 22:07:39 +0000
(14:07 -0800)
committer
Dan Boger
<zigdon@irc.peeron.com>
Sat, 7 Mar 2009 22:07:39 +0000
(14:07 -0800)
twirssi.pl
patch
|
blob
|
history
diff --git
a/twirssi.pl
b/twirssi.pl
index 0d4c1e5d58ba28d07cca6abe6be5ade757f824de..44fae63fbbab12e5f3c808a181596377a080d32a 100644
(file)
--- a/
twirssi.pl
+++ b/
twirssi.pl
@@
-12,7
+12,7
@@
$Data::Dumper::Indent = 1;
use vars qw($VERSION %IRSSI);
$VERSION = "2.1.2beta";
use vars qw($VERSION %IRSSI);
$VERSION = "2.1.2beta";
-my ($REV) = '$Rev: 52
1
$' =~ /(\d+)/;
+my ($REV) = '$Rev: 52
2
$' =~ /(\d+)/;
%IRSSI = (
authors => 'Dan Boger',
contact => 'zigdon@gmail.com',
%IRSSI = (
authors => 'Dan Boger',
contact => 'zigdon@gmail.com',
@@
-21,7
+21,7
@@
my ($REV) = '$Rev: 521 $' =~ /(\d+)/;
. 'Can optionally set your bitlbee /away message to same',
license => 'GNU GPL v2',
url => 'http://twirssi.com',
. 'Can optionally set your bitlbee /away message to same',
license => 'GNU GPL v2',
url => 'http://twirssi.com',
- changed => '$Date: 2009-03-07 1
3:50:54
-0800 (Sat, 07 Mar 2009) $',
+ changed => '$Date: 2009-03-07 1
4:07:25
-0800 (Sat, 07 Mar 2009) $',
);
my $window;
);
my $window;
@@
-354,14
+354,26
@@
sub cmd_login {
{
my @user = split /\s*,\s*/, $autouser;
my @pass = split /\s*,\s*/, $autopass;
{
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 );
¬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;
$u = shift @user;
- $p = shift @
pass
;
+ $p = shift @
unescaped
;
&cmd_login("$u $p");
}
return;
&cmd_login("$u $p");
}
return;