From e0c0679773d1822a8f6f98944aeb91b9e0e001a2 Mon Sep 17 00:00:00 2001 From: mitty Date: Tue, 5 Oct 2010 14:48:18 +0000 Subject: [PATCH] * remove needless hash check git-svn-id: https://lab.mitty.jp/svn/lab/trunk@69 7d2118f6-f56c-43e7-95a2-4bb3031d96e7 --- twitter/twitterbot.pl | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) 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 -- 1.7.9.5