--- trunk/bin/irc-logger.pl 2008/03/07 15:49:23 97
+++ trunk/bin/irc-logger.pl 2008/03/07 17:13:30 99
@@ -117,11 +117,11 @@
# protect HTML from wiki modifications
sub e {
my $t = shift;
- return 'uri_unescape{' . uri_escape($t) . '}';
+ return 'uri_unescape{' . uri_escape($t, '^a-zA-Z0-9') . '}';
}
$m =~ s/($escape_re)/$escape{$1}/gs;
- $m =~ s#($RE{URI}{HTTP})#e(qq{$1})#egs ||
+ $m =~ s#($RE{URI}{HTTP})#e(qq{$1})#egs;
$m =~ s#\/(\w+)\/#$1#gs;
$m =~ s#$tag_regex#e(qq{$1})#egs;
$m =~ s#\*(\w+)\*#$1#gs;
@@ -938,7 +938,9 @@
stop => qq{ update feeds set active = false where url = ? },
};
- if (my $q = $sql->{$command} ) {
+ if ( $command eq 'add' && ! $channel ) {
+ $res = "ERROR: got '$msg' which doesn't have #channel in it, ignoring!";
+ } elsif (my $q = $sql->{$command} ) {
my $sth = $dbh->prepare( $q );
my @data = ( $url );
if ( $command eq 'add' ) {
@@ -954,7 +956,6 @@
} else {
$res = "ERROR: don't know what to do with: $msg";
}
-
}
if ($res) {