aboutsummaryrefslogtreecommitdiffstats
path: root/longify
diff options
context:
space:
mode:
authorricho <richo@psych0tik.net>2011-09-21 11:33:31 +0000
committerricho <richo@psych0tik.net>2011-09-21 11:33:31 +0000
commitc705a09d0fe81ac20497d17640792cdcaf5ec0d0 (patch)
treeaaa382f548260902c96274e75c7a184db0e7cf8d /longify
parentMerge branch 'master' into richoH-dev (diff)
parentRemove deprecated docs (diff)
downloadirssi-scripts-c705a09d0fe81ac20497d17640792cdcaf5ec0d0.tar.gz
irssi-scripts-c705a09d0fe81ac20497d17640792cdcaf5ec0d0.zip
Merge branch 'master' into richoH-dev
Diffstat (limited to 'longify')
-rw-r--r--longify/longify-urls.pl7
1 files changed, 6 insertions, 1 deletions
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;