diff options
Diffstat (limited to '')
-rw-r--r-- | feature-tests/getchan.pl | 2 | ||||
-rw-r--r-- | longify/longify-urls.pl | 7 |
2 files changed, 7 insertions, 2 deletions
diff --git a/feature-tests/getchan.pl b/feature-tests/getchan.pl index 7d4ee55..acb1748 100644 --- a/feature-tests/getchan.pl +++ b/feature-tests/getchan.pl @@ -104,7 +104,7 @@ sub restore_formats { Irssi::command("^FORMAT chansetup_line $line_format"); Irssi::command("^FORMAT chansetup_header $head_format"); if ($foot_format =~ m/^\s*$/) { - Irssi::command("^FORMAT -reset chansetup_footer"); + Irssi::command("^FORMAT -delete chansetup_footer"); } else { Irssi::command("^FORMAT chansetup_footer $foot_format"); } diff --git a/longify/longify-urls.pl b/longify/longify-urls.pl index 38e8ba8..cd36503 100644 --- a/longify/longify-urls.pl +++ b/longify/longify-urls.pl @@ -130,7 +130,12 @@ sub _handle_messages { my $uri_obj = URI->new($url); - return unless ref($uri_obj) && exists $domains->{$uri_obj->host}; + # check we've got a valid url + return unless ref($uri_obj); + return unless $uri_obj->can('host'); + + # match against the whitelist. + return unless exists $domains->{$uri_obj->host}; $pending_msg_params->{$url} = [@_]; $lookup_in_progress = 1; |