From 6d8b6532b6b9904cb60d67408466464d6c6eb6fa Mon Sep 17 00:00:00 2001 From: Pragmatic Software Date: Tue, 8 Sep 2015 05:30:02 -0700 Subject: [PATCH] Immediate leave UrlTitles if message doesn't contain a URL --- PBot/Plugins/UrlTitles.pm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/PBot/Plugins/UrlTitles.pm b/PBot/Plugins/UrlTitles.pm index 4ed3aaa8..b74c55fe 100644 --- a/PBot/Plugins/UrlTitles.pm +++ b/PBot/Plugins/UrlTitles.pm @@ -41,6 +41,8 @@ sub show_url_titles { my ($nick, $user, $host) = ($event->{event}->nick, $event->{event}->user, $event->{event}->host); my $msg = $event->{event}->{args}[0]; + return 0 if not $msg =~ m/https?:\/\/[^\s]/; + if ($self->{pbot}->{ignorelist}->check_ignore($nick, $user, $host, $channel)) { my $admin = $self->{pbot}->{admins}->loggedin($channel, "$nick!$user\@$host"); if (!defined $admin || $admin->{level} < 10) {