/[irc-logger]/trunk/bin/irc-logger.pl
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /trunk/bin/irc-logger.pl

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 70 by dpavlin, Sun Dec 16 18:37:04 2007 UTC revision 72 by dpavlin, Sun Dec 16 19:03:35 2007 UTC
# Line 970  sub root_handler { Line 970  sub root_handler {
970    
971          my $search = $q->param('search') || $q->param('grep') || '';          my $search = $q->param('search') || $q->param('grep') || '';
972    
973          if ($request->url =~ m#/(rss|atom)#) {          if ($request->url =~ m#/rss#i) {
974                  my $type = uc($1);                  my $type = 'RSS';       # Atom
                 my $url = "http://$http_hostname:$http_port";  
975    
976                  $response->content_type("application/$type+xml");                  $response->content_type( 'application/' . lc($type) . '+xml' );
977    
978                  my $html = '<!-- error -->';                  my $html = '<!-- error -->';
979                  warn "create $type feed from ",dump( @last_tags );                  warn "create $type feed from ",dump( @last_tags );
# Line 982  sub root_handler { Line 981  sub root_handler {
981                  my $feed = XML::Feed->new( $type );                  my $feed = XML::Feed->new( $type );
982    
983                  $feed->title( "last $last_x_tags from $CHANNEL" );                  $feed->title( "last $last_x_tags from $CHANNEL" );
984                  $feed->link( "http://$http_hostname:$http_port" );  #               $feed->link( "http://$http_hostname:$http_port" );
985                  $feed->description( "collects messages which have tags// in them" );                  $feed->description( "collects messages which have tags// in them" );
986    
987                  foreach my $m ( @last_tags ) {                  foreach my $m ( @last_tags ) {
# Line 994  sub root_handler { Line 993  sub root_handler {
993  #                       $feed_entry->link(  );  #                       $feed_entry->link(  );
994                          $feed_entry->issued( DateTime::Format::Flexible->build( $m->{time} ) );                          $feed_entry->issued( DateTime::Format::Flexible->build( $m->{time} ) );
995                          $feed_entry->summary(                          $feed_entry->summary(
996                                    '<![CDATA[' .
997  #                               $filter->{nick}->( $m->{nick} ) .  #                               $filter->{nick}->( $m->{nick} ) .
998  #                               '<tt>' . $m->{nick} . '</tt> ' .  #                               '<tt>' . $m->{nick} . '</tt> ' .
999                                  $filter->{message}->( $m->{message} )                                  $filter->{message}->( $m->{message} ) .
1000                                    ']]>'
1001                          );                          );
1002                            $feed_entry->category( join(', ', @{$m->{tags}}) );
1003                          $feed->add_entry( $feed_entry );                          $feed->add_entry( $feed_entry );
1004                  }                  }
1005    

Legend:
Removed from v.70  
changed lines
  Added in v.72

  ViewVC Help
Powered by ViewVC 1.1.26