From: mitty <mitty@7d2118f6-f56c-43e7-95a2-4bb3031d96e7>
Date: Tue, 5 Oct 2010 14:48:18 +0000 (+0000)
Subject:  * remove needless hash check
X-Git-Tag: r89-trunk~19
X-Git-Url: http://lab.mitty.jp/git/?a=commitdiff_plain;h=e0c0679773d1822a8f6f98944aeb91b9e0e001a2;p=lab.git

 * remove needless hash check

git-svn-id: https://lab.mitty.jp/svn/lab/trunk@69 7d2118f6-f56c-43e7-95a2-4bb3031d96e7
---

diff --git a/twitter/twitterbot.pl b/twitter/twitterbot.pl
index d1dd229..406ee12 100755
--- a/twitter/twitterbot.pl
+++ b/twitter/twitterbot.pl
@@ -36,17 +36,14 @@ if (! $bot->authorized) {
 }
 
 my $tweets = {};
-my $tweet;
-
-$tweet = or_search($bot, $conf->{hashtag}, $stat->{search});
-if ($tweet) {
-    %$tweets = (%$tweets, %$tweet);
-}
-
-$tweet = mentions_ids($bot, $stat->{mention});
-if ($tweet) {
-    %$tweets = (%$tweets, %$tweet);
-}
+%$tweets = (
+    %$tweets,
+    %{ or_search($bot, $conf->{hashtag}, $stat->{search}) }
+);
+%$tweets = (
+    %$tweets,
+    %{ mentions_ids($bot, $stat->{mention}) }
+);
 
 foreach my $id (sort keys %$tweets) {
     # $tweets->{$id}{type} eq 'search'  => found by search API