* add search command
[lab.git] / Dev / twitter / twitterbot.pl
index f9dea40..ae37ea6 100755 (executable)
@@ -106,6 +106,7 @@ foreach my $id (sort keys %$tweets) {
     }
     
     if ($skip) {
+        $stat->{$tweets->{$id}{type}} = $id;
         next;
     }
     
@@ -142,7 +143,7 @@ if ($conf->{mail}{body}) {
     DEBUG or sendmail(%mail) or warn "Error sending mail: $Mail::Sendmail::error\n";
 }
 
-if ($tweets) {
+if (ref $tweets and keys %{$tweets}) {
     # save last status to yaml file
     DEBUG  or YAML::Tiny::DumpFile("$Bin/status.yml", $stat);
     DEBUG and warn "status.yml => ", Dumper($stat);