--- trunk/bin/irc-logger.pl 2008/03/14 16:06:57 126 +++ trunk/bin/irc-logger.pl 2008/03/14 17:44:23 129 @@ -1005,7 +1005,7 @@ my $sql = { add => qq{ insert into feeds (url,name,channel,nick,private) values (?,?,?,?,?) }, -# remove => qq{ delete from feeds where url = ? and name = ? }, + remove => qq{ delete from feeds where url = ? and nick = ? }, start => qq{ update feeds set active = true where url = ? }, stop => qq{ update feeds set active = false where url = ? }, clean => qq{ update feeds set last_update = now() - delay where url = ? }, @@ -1018,13 +1018,18 @@ my @data = ( $url ); if ( $command eq 'add' ) { push @data, ( $arg, $channel, $nick, $sub eq 'private' ? 1 : 0 ); + } elsif ( $command eq 'remove' ) { + push @data, $nick; } warn "## $command SQL $q with ",dump( @data ),"\n"; eval { $sth->execute( @data ) }; if ($@) { $res = "ERROR: $@"; } else { - $res = "OK, RSS executed $command" . ( $sub ? "-$sub" : '' ) ." on $channel url $url"; + $res = "OK, RSS executed $command" . + ( $sub ? "-$sub " : ' ' ) . + ( $channel ? "on $channel " : '' ) . + "url $url"; if ( $command eq 'clean' ) { my $seen = $_stat->{rss}->{seen} || die "no seen?"; my $want_link = $_stat->{rss}->{url2link}->{$url} || warn "no url2link($url)";