/[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 142 by dpavlin, Fri Feb 6 14:17:44 2009 UTC revision 149 by dpavlin, Sat Oct 8 18:33:36 2011 UTC
# Line 18  use Carp qw/confess/; Line 18  use Carp qw/confess/;
18  use XML::Feed;  use XML::Feed;
19  use DateTime::Format::Flexible;  use DateTime::Format::Flexible;
20  use Encode;  use Encode;
21    #use Redis 2.0;
22    
23  =head1 NAME  =head1 NAME
24    
# Line 564  sub save_message { Line 565  sub save_message {
565                  " " . $a->{message};                  " " . $a->{message};
566    
567          eval { $sth_insert_log->execute($a->{channel}, $a->{me}, $a->{nick}, $a->{message}, $a->{time}); };          eval { $sth_insert_log->execute($a->{channel}, $a->{me}, $a->{nick}, $a->{message}, $a->{time}); };
568    
569            eval {
570            my @channel = ( 'channel' , $a->{channel}, $a->{nick} );
571            push @channel, 'me' if $a->{me};
572    #       my $redis = Redis->new( server => '192.168.1.61:6379' );
573    #       $redis->publish( join(' ',@channel), $a->{message} );
574            };
575    
576          if ( $@ ) {          if ( $@ ) {
577                  _log "ERROR: can't archive ", $a->{message};                  _log "ERROR: can't archive ", $a->{message};
578          } else {          } else {
# Line 1173  sub root_handler { Line 1182  sub root_handler {
1182    
1183          return RC_OK if $request->uri =~ m/favicon.ico$/;          return RC_OK if $request->uri =~ m/favicon.ico$/;
1184    
1185            if ( $request->uri =~ m/robots.txt$/ ) {
1186                    $response->content_type( 'text/plain' );
1187                    $response->content( qq{
1188    
1189    User-Agent: *
1190    Disallow: /
1191    
1192                    });
1193                    return RC_OK;
1194            }
1195    
1196          my $q;          my $q;
1197    
1198          if ( $request->method eq 'POST' ) {          if ( $request->method eq 'POST' ) {
# Line 1309  sub root_handler { Line 1329  sub root_handler {
1329          my $html =          my $html =
1330                  qq{<html><head><title>$NICK</title><style type="text/css">$style}                  qq{<html><head><title>$NICK</title><style type="text/css">$style}
1331                  . $cloud->css                  . $cloud->css
1332                  . qq{</style></head><body>}                  . qq{</style>
1333                    <meta name="google-site-verification" content="oe-LvUiNiQRPpc_uB-3rY4MWvFifkmLf276WzAvTL5U" />  
1334                    </head><body>}
1335                  . qq{                  . qq{
1336                  <form method="post" class="search" action="/">                  <form method="post" class="search" action="/">
1337                  <input type="text" name="search" value="$search" size="10">                  <input type="text" name="search" value="$search" size="10">

Legend:
Removed from v.142  
changed lines
  Added in v.149

  ViewVC Help
Powered by ViewVC 1.1.26