--- trunk/bin/irc-logger.pl 2007/12/16 18:37:04 70 +++ trunk/bin/irc-logger.pl 2007/12/16 19:03:35 72 @@ -970,11 +970,10 @@ my $search = $q->param('search') || $q->param('grep') || ''; - if ($request->url =~ m#/(rss|atom)#) { - my $type = uc($1); - my $url = "http://$http_hostname:$http_port"; + if ($request->url =~ m#/rss#i) { + my $type = 'RSS'; # Atom - $response->content_type("application/$type+xml"); + $response->content_type( 'application/' . lc($type) . '+xml' ); my $html = ''; warn "create $type feed from ",dump( @last_tags ); @@ -982,7 +981,7 @@ my $feed = XML::Feed->new( $type ); $feed->title( "last $last_x_tags from $CHANNEL" ); - $feed->link( "http://$http_hostname:$http_port" ); +# $feed->link( "http://$http_hostname:$http_port" ); $feed->description( "collects messages which have tags// in them" ); foreach my $m ( @last_tags ) { @@ -994,10 +993,13 @@ # $feed_entry->link( ); $feed_entry->issued( DateTime::Format::Flexible->build( $m->{time} ) ); $feed_entry->summary( + '{nick}->( $m->{nick} ) . # '' . $m->{nick} . ' ' . - $filter->{message}->( $m->{message} ) + $filter->{message}->( $m->{message} ) . + ']]>' ); + $feed_entry->category( join(', ', @{$m->{tags}}) ); $feed->add_entry( $feed_entry ); }