--- trunk/bin/irc-logger.pl 2009/02/06 14:12:00 141 +++ trunk/bin/irc-logger.pl 2011/10/08 18:33:36 149 @@ -18,6 +18,7 @@ use XML::Feed; use DateTime::Format::Flexible; use Encode; +#use Redis 2.0; =head1 NAME @@ -145,7 +146,7 @@ $m =~ s/($escape_re)/$escape{$1}/gs; $m =~ s#($RE{URI}{HTTP})#e(qq{$1})#egs; - $m =~ s#\/(\w+)\/#$1#gs; +# $m =~ s#\/(\w+)\/#$1#gs; $m =~ s#$tag_regex#e(qq{$1})#egs; $m =~ s#\*(\w+)\*#$1#gs; $m =~ s#_(\w+)_#$1#gs; @@ -564,6 +565,14 @@ " " . $a->{message}; eval { $sth_insert_log->execute($a->{channel}, $a->{me}, $a->{nick}, $a->{message}, $a->{time}); }; + + eval { + my @channel = ( 'channel' , $a->{channel}, $a->{nick} ); + push @channel, 'me' if $a->{me}; +# my $redis = Redis->new( server => '192.168.1.61:6379' ); +# $redis->publish( join(' ',@channel), $a->{message} ); + }; + if ( $@ ) { _log "ERROR: can't archive ", $a->{message}; } else { @@ -1173,6 +1182,17 @@ return RC_OK if $request->uri =~ m/favicon.ico$/; + if ( $request->uri =~ m/robots.txt$/ ) { + $response->content_type( 'text/plain' ); + $response->content( qq{ + +User-Agent: * +Disallow: / + + }); + return RC_OK; + } + my $q; if ( $request->method eq 'POST' ) { @@ -1309,7 +1329,9 @@ my $html = qq{$NICK} + . qq{ + + } . qq{