--- trunk/bin/irc-logger.pl 2007/12/16 20:06:47 73 +++ trunk/bin/irc-logger.pl 2007/12/16 20:17:26 74 @@ -507,8 +507,8 @@ } if ( @tags ) { - shift @last_tags if $#last_tags == $last_x_tags; - push @last_tags, { tags => [ @tags ], %$arg }; + pop @last_tags if $#last_tags == $last_x_tags; + unshift @last_tags, { tags => [ @tags ], %$arg }; } } @@ -520,7 +520,7 @@ =cut sub seed_tags { - my $sth = $dbh->prepare(qq{ select id,message,nick,me,time from log where message like '%//%' }); + my $sth = $dbh->prepare(qq{ select id,message,nick,me,time from log where message like '%//%' order by time asc }); $sth->execute; while (my $row = $sth->fetchrow_hashref) { add_tag( %$row ); @@ -979,12 +979,12 @@ $response->content_type( 'application/' . lc($type) . '+xml' ); my $html = ''; - warn "create $type feed from ",dump( @last_tags ); + #warn "create $type feed from ",dump( @last_tags ); my $feed = XML::Feed->new( $type ); $feed->title( "last $last_x_tags from $CHANNEL" ); -# $feed->link( "http://$http_hostname:$http_port" ); + $feed->link( $url ); $feed->description( "collects messages which have tags// in them" ); foreach my $m ( @last_tags ) { @@ -1097,7 +1097,7 @@ }; $response->content( $html ); - warn "<< ", $request->method, $request->uri, " created ", length($html), " bytes\n"; + warn "<< ", $request->method, " ", $request->uri, " created ", length($html), " bytes\n"; return RC_OK; }