From 2353bdde1c7ff41235ac7abb4bacbf666fa67331 Mon Sep 17 00:00:00 2001 From: Pragmatic Software Date: Mon, 6 Aug 2018 09:49:03 -0700 Subject: [PATCH] UrlTitles: disregard the specific spam URL instead of entire message --- PBot/Plugins/UrlTitles.pm | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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",