mirror of
https://github.com/pragma-/pbot.git
synced 2025-10-14 23:17:22 +02:00
Move URL titles conditional out of loop
This commit is contained in:
parent
c57c9e2f13
commit
6c5c263ed2
@ -48,12 +48,13 @@ sub show_url_titles {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
while ($msg =~ s/(https?:\/\/[^\s]+)//i && ++$event->{interpreted} <= 3) {
|
if($self->{pbot}->{registry}->get_value('general', 'show_url_titles')
|
||||||
my $url = $1;
|
and not $self->{pbot}->{registry}->get_value($channel, 'no_url_titles')
|
||||||
if($self->{pbot}->{registry}->get_value('general', 'show_url_titles') and not $self->{pbot}->{registry}->get_value($channel, 'no_url_titles')
|
|
||||||
and not grep { $channel =~ /$_/i } $self->{pbot}->{registry}->get_value('general', 'show_url_titles_ignore_channels')
|
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')) {
|
and grep { $channel =~ /$_/i } $self->{pbot}->{registry}->get_value('general', 'show_url_titles_channels')) {
|
||||||
$self->{pbot}->{factoids}->{factoidmodulelauncher}->execute_module($channel, undef, $nick, $user, $host, $msg, "title", "$nick $url");
|
|
||||||
|
while ($msg =~ s/(https?:\/\/[^\s]+)//i && ++$event->{interpreted} <= 3) {
|
||||||
|
$self->{pbot}->{factoids}->{factoidmodulelauncher}->execute_module($channel, undef, $nick, $user, $host, $msg, "title", "$nick $1");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user