Changeset 641934f in lab.git for Dev/twitter/twitterbot.pl
- Timestamp:
- Jan 10, 2011 3:16:48 PM (14 years ago)
- Branches:
- master, trunk
- Children:
- 702399e
- Parents:
- 5fa546f
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Dev/twitter/twitterbot.pl
r8333ea0 r641934f 50 50 # eq 'mention' => found by mention API 51 51 if ($tweets->{$id}{type} eq 'retweet') { 52 DEBUG and warn "skipping $id that was already retweeted\n"; 52 53 next; 53 54 } 55 if (defined $conf->{allow}) { 56 my $flag; 57 foreach my $screen_name ( @{ $conf->{allow}{screen_name} } ) { 58 if ($tweets->{$id}{screen_name} eq $screen_name) { 59 DEBUG and warn "$id was allowed by screen_name\n"; 60 $flag = $id; 61 last; 62 } 63 } 64 foreach my $user_id ( @{ $conf->{allow}{user_id} } ) { 65 if ($tweets->{$id}{user_id} eq $user_id) { 66 DEBUG and warn "$id was allowed by user_id\n"; 67 $flag = $id; 68 last; 69 } 70 } 71 if (! $flag) { 72 next; 73 } 74 } 75 54 76 DEBUG or sleep($conf->{sleep}); 55 77 … … 88 110 warn "$0: '$file' $!\n"; 89 111 } 112 113 DEBUG and warn "'$file' => ", Dumper($yaml); 90 114 91 115 return $yaml->[0];
Note: See TracChangeset
for help on using the changeset viewer.