mirror of
https://github.com/pragma-/pbot.git
synced 2024-11-23 04:19:27 +01:00
UrlTitles: disregard the specific spam URL instead of entire message
This commit is contained in:
parent
e33504db93
commit
2353bdde1c
@ -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",
|
||||
|
Loading…
Reference in New Issue
Block a user