/[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 24 by dpavlin, Sun Mar 26 17:49:54 2006 UTC revision 25 by dpavlin, Sat May 20 10:12:19 2006 UTC
# Line 144  sub get_from_log { Line 144  sub get_from_log {
144    
145          my $sql = $context ? $sql_context : $sql_message;          my $sql = $context ? $sql_context : $sql_message;
146    
147          $sql .= " where message ilike ? " if ($args->{search});          $sql .= " where message ilike ? or nick ilike ? " if ($args->{search});
148          $sql .= " order by log.time desc";          $sql .= " order by log.time desc";
149          $sql .= " limit " . $args->{limit};          $sql .= " limit " . $args->{limit};
150    
# Line 152  sub get_from_log { Line 152  sub get_from_log {
152          if (my $search = $args->{search}) {          if (my $search = $args->{search}) {
153                  $search =~ s/^\s+//;                  $search =~ s/^\s+//;
154                  $search =~ s/\s+$//;                  $search =~ s/\s+$//;
155                  $sth->execute( '%' . $search . '%' );                  $sth->execute( ( '%' . $search . '%' ) x 2 );
156                  warn "search for '$search' returned ", $sth->rows, " results ", $context || '', "\n";                  warn "search for '$search' returned ", $sth->rows, " results ", $context || '', "\n";
157          } else {          } else {
158                  $sth->execute();                  $sth->execute();

Legend:
Removed from v.24  
changed lines
  Added in v.25

  ViewVC Help
Powered by ViewVC 1.1.26