diff --git a/PBot/Plugins/UrlTitles.pm b/PBot/Plugins/UrlTitles.pm index d151a64c..4f337c31 100644 --- a/PBot/Plugins/UrlTitles.pm +++ b/PBot/Plugins/UrlTitles.pm @@ -59,11 +59,14 @@ sub show_url_titles { and not grep { $channel =~ /$_/i } $self->{pbot}->{registry}->get_value('general', 'show_url_titles_ignore_channels') and grep { $channel =~ /$_/i } $self->{pbot}->{registry}->get_value('general', 'show_url_titles_channels')) { - return 0 if $self->{pbot}->{antispam}->is_spam('url', $msg); - while ($msg =~ s/(https?:\/\/[^\s]+)//i && ++$event->{interpreted} <= 3) { my $url = $1; + if ($self->{pbot}->{antispam}->is_spam('url', $url)) { + $self->{pbot}->{logger}->log("Ignoring spam URL $url\n"); + next; + } + my $stuff = { from => $channel, nick => $nick, user => $user, host => $host, command => "title $nick $url", root_channel => $channel, root_keyword => "title",