Immediate leave UrlTitles if message doesn't contain a URL

This commit is contained in:
Pragmatic Software 2015-09-08 05:30:02 -07:00
parent c9711e5fa4
commit 6d8b6532b6
1 changed files with 2 additions and 0 deletions

View File

@ -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) {