/[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 97 by dpavlin, Fri Mar 7 15:49:23 2008 UTC revision 99 by dpavlin, Fri Mar 7 17:13:30 2008 UTC
# Line 117  my $filter = { Line 117  my $filter = {
117                  # protect HTML from wiki modifications                  # protect HTML from wiki modifications
118                  sub e {                  sub e {
119                          my $t = shift;                          my $t = shift;
120                          return 'uri_unescape{' . uri_escape($t) . '}';                          return 'uri_unescape{' . uri_escape($t, '^a-zA-Z0-9') . '}';
121                  }                  }
122    
123                  $m =~ s/($escape_re)/$escape{$1}/gs;                  $m =~ s/($escape_re)/$escape{$1}/gs;
124                  $m =~ s#($RE{URI}{HTTP})#e(qq{<a href="$1">$1</a>})#egs ||                  $m =~ s#($RE{URI}{HTTP})#e(qq{<a href="$1">$1</a>})#egs;
125                  $m =~ s#\/(\w+)\/#<i>$1</i>#gs;                  $m =~ s#\/(\w+)\/#<i>$1</i>#gs;
126                  $m =~ s#$tag_regex#e(qq{<a href="$url?tag=$1" class="tag">$1</a>})#egs;                  $m =~ s#$tag_regex#e(qq{<a href="$url?tag=$1" class="tag">$1</a>})#egs;
127                  $m =~ s#\*(\w+)\*#<b>$1</b>#gs;                  $m =~ s#\*(\w+)\*#<b>$1</b>#gs;
# Line 938  POE::Session->create( inline_states => { Line 938  POE::Session->create( inline_states => {
938                                  stop    => qq{ update feeds set active = false  where url = ? },                                  stop    => qq{ update feeds set active = false  where url = ? },
939                          };                          };
940    
941                          if (my $q = $sql->{$command} ) {                          if ( $command eq 'add' && ! $channel ) {
942                                    $res = "ERROR: got '$msg' which doesn't have #channel in it, ignoring!";
943                            } elsif (my $q = $sql->{$command} ) {
944                                  my $sth = $dbh->prepare( $q );                                  my $sth = $dbh->prepare( $q );
945                                  my @data = ( $url );                                  my @data = ( $url );
946                                  if ( $command eq 'add' ) {                                  if ( $command eq 'add' ) {
# Line 954  POE::Session->create( inline_states => { Line 956  POE::Session->create( inline_states => {
956                          } else {                          } else {
957                                  $res = "ERROR: don't know what to do with: $msg";                                  $res = "ERROR: don't know what to do with: $msg";
958                          }                          }
   
959                  }                  }
960    
961                  if ($res) {                  if ($res) {

Legend:
Removed from v.97  
changed lines
  Added in v.99

  ViewVC Help
Powered by ViewVC 1.1.26