# $tweets->{$id}{type} eq 'search' => found by search API
# eq 'mention' => found by mention API
if ($tweets->{$id}{type} eq 'retweet') {
+ DEBUG and warn "skipping $id that was already retweeted\n";
next;
}
+ if (defined $conf->{allow}) {
+ my $flag;
+ foreach my $screen_name ( @{ $conf->{allow}{screen_name} } ) {
+ if ($tweets->{$id}{screen_name} eq $screen_name) {
+ DEBUG and warn "$id was allowed by screen_name\n";
+ $flag = $id;
+ last;
+ }
+ }
+ foreach my $user_id ( @{ $conf->{allow}{user_id} } ) {
+ if ($tweets->{$id}{user_id} eq $user_id) {
+ DEBUG and warn "$id was allowed by user_id\n";
+ $flag = $id;
+ last;
+ }
+ }
+ if (! $flag) {
+ next;
+ }
+ }
+
DEBUG or sleep($conf->{sleep});
# do retweet found tweets
warn "$0: '$file' $!\n";
}
+ DEBUG and warn "'$file' => ", Dumper($yaml);
+
return $yaml->[0];
}