+ my %meta;
+ foreach my $key (qw/id account nick type/) {
+ s/^$key:(\S+)\s*//;
+ $meta{$key} = $1;
+ }
+
+ next if exists $tweet_cache{$meta{id}};
+ $tweet_cache{$meta{id}} = time;
+ my $account = "";
+ if ($meta{account} ne $user) {
+ $account = "$meta{account}: ";
+ }
+ if ($meta{type} eq 'tweet') {
+ push @lines, "[$account%B\@$meta{nick}%n] $_\n",
+ } elsif ($meta{type} eq 'reply') {
+ push @lines, "[$account\\--> %B\@$meta{nick}%n] $_\n",
+ } elsif ($meta{type} eq 'dm') {
+ push @lines, "[$account%B\@$meta{nick}%n (%%WDM%%n)] $_\n",
+ } elsif ($meta{type} eq 'debug') {
+ push @lines, "debug: $_\n" if &debug,