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 (from parent 1:
3755151
)
1.7.3 - r352 - Add an eval when fetching context messages. Demote all error messages...
author
Dan Boger
<zigdon@irc.peeron.com>
Thu, 8 Jan 2009 21:47:44 +0000
(13:47 -0800)
committer
Dan Boger
<zigdon@irc.peeron.com>
Thu, 8 Jan 2009 21:47:44 +0000
(13:47 -0800)
twirssi.pl
patch
|
blob
|
history
diff --git
a/twirssi.pl
b/twirssi.pl
index 5c68213e943a51f237f13901d2a6bb34ee961300..b7e17677b0c9798ce9abab55ae6cb808b8b702bd 100644
(file)
--- a/
twirssi.pl
+++ b/
twirssi.pl
@@
-18,8
+18,8
@@
BEGIN {
use vars qw($VERSION %IRSSI);
use vars qw($VERSION %IRSSI);
-$VERSION = "1.7.
2
";
-my ($REV) = '$Rev: 35
1
$' =~ /(\d+)/;
+$VERSION = "1.7.
3
";
+my ($REV) = '$Rev: 35
2
$' =~ /(\d+)/;
%IRSSI = (
authors => 'Dan Boger',
contact => 'zigdon@gmail.com',
%IRSSI = (
authors => 'Dan Boger',
contact => 'zigdon@gmail.com',
@@
-28,7
+28,7
@@
my ($REV) = '$Rev: 351 $' =~ /(\d+)/;
. 'Can optionally set your bitlbee /away message to same',
license => 'GNU GPL v2',
url => 'http://tinyurl.com/twirssi',
. 'Can optionally set your bitlbee /away message to same',
license => 'GNU GPL v2',
url => 'http://tinyurl.com/twirssi',
- changed => '$Date: 2009-01-0
6 19:33:41 -0800 (Tue, 06
Jan 2009) $',
+ changed => '$Date: 2009-01-0
8 13:46:50 -0800 (Thu, 08
Jan 2009) $',
);
my $window;
);
my $window;
@@
-571,7
+571,7
@@
sub load_friends {
};
if ($@) {
};
if ($@) {
- print $fh "type:
error
Error during friends list update. Aborted.\n";
+ print $fh "type:
debug
Error during friends list update. Aborted.\n";
return;
}
return;
}
@@
-644,7
+644,7
@@
sub get_updates {
}
if ($error) {
}
if ($error) {
- print $fh "type:
error
Update encountered errors. Aborted\n";
+ print $fh "type:
debug
Update encountered errors. Aborted\n";
print $fh $last_poll;
} else {
print $fh $new_poll;
print $fh $last_poll;
} else {
print $fh $new_poll;
@@
-666,17
+666,17
@@
sub do_updates {
};
if ($@) {
};
if ($@) {
- print $fh "type:
error
Error during friends_timeline call. Aborted.\n";
+ print $fh "type:
debug
Error during friends_timeline call. Aborted.\n";
return 1;
}
unless ( ref $tweets ) {
if ( $obj->can("get_error") ) {
return 1;
}
unless ( ref $tweets ) {
if ( $obj->can("get_error") ) {
- print $fh "type:
error
API Error during friends_timeline call: ",
+ print $fh "type:
debug
API Error during friends_timeline call: ",
JSON::Any->jsonToObj( $obj->get_error() ), " Aborted.\n";
} else {
print $fh
JSON::Any->jsonToObj( $obj->get_error() ), " Aborted.\n";
} else {
print $fh
- "type:
error
API Error during friends_timeline call. Aborted.\n";
+ "type:
debug
API Error during friends_timeline call. Aborted.\n";
}
return 1;
}
}
return 1;
}
@@
-692,7
+692,11
@@
sub do_updates {
and not exists $friends{ $t->{in_reply_to_screen_name} } )
{
$nicks{ $t->{in_reply_to_screen_name} } = time;
and not exists $friends{ $t->{in_reply_to_screen_name} } )
{
$nicks{ $t->{in_reply_to_screen_name} } = time;
- my $context = $obj->show_status( $t->{in_reply_to_status_id} );
+ my $context;
+ eval {
+ $context = $obj->show_status( $t->{in_reply_to_status_id} );
+ };
+
if ($context) {
my $ctext = decode_entities( $context->{text} );
$ctext =~ s/%/%%/g;
if ($context) {
my $ctext = decode_entities( $context->{text} );
$ctext =~ s/%/%%/g;
@@
-701,8
+705,10
@@
sub do_updates {
$context->{id}, $username,
$context->{user}{screen_name}, $ctext;
$reply = "reply";
$context->{id}, $username,
$context->{user}{screen_name}, $ctext;
$reply = "reply";
+ } elsif ($@) {
+ print $fh "type:debug request to get context failed: $@";
} else {
} else {
- print
"
Failed to get context from $t->{in_reply_to_screen_name}"
+ print
$fh "type:debug
Failed to get context from $t->{in_reply_to_screen_name}"
if &debug;
}
}
if &debug;
}
}
@@
-720,7
+726,7
@@
sub do_updates {
};
if ($@) {
};
if ($@) {
- print $fh "type:
error
Error during replies call. Aborted.\n";
+ print $fh "type:
debug
Error during replies call. Aborted.\n";
return 1;
}
return 1;
}
@@
-743,7
+749,7
@@
sub do_updates {
};
if ($@) {
};
if ($@) {
- print $fh "type:
error
Error during direct_messages call. Aborted.\n";
+ print $fh "type:
debug
Error during direct_messages call. Aborted.\n";
return 1;
}
return 1;
}