From: zdleaf Date: Sun, 16 Sep 2018 10:31:07 +0000 (+0100) Subject: added use strict X-Git-Url: http://git.99rst.org/?a=commitdiff_plain;h=225519038dbe53198a361e0de5c82e1a80d41934;p=irssi-scripts.irssi.org.git added use strict --- diff --git a/scripts/urlwindow.pl b/scripts/urlwindow.pl index c485427..3f9e676 100644 --- a/scripts/urlwindow.pl +++ b/scripts/urlwindow.pl @@ -4,18 +4,19 @@ use Irssi; use POSIX; -use vars qw($VERSION %IRSSI); +use vars qw($VERSION %IRSSI); +use strict; -$VERSION = "1.0"; +$VERSION = "1.1"; %IRSSI = ( authors => "zdleaf", - contact => "leaf@zincldn.co.uk", + contact => 'leaf@zincldn.co.uk', name => "urlwindow", description => "Print urls to window named \"urls\"", license => "Public Domain", url => "http://irssi.org/", ); - + sub sig_printtext { my ($dest, $text, $stripped) = @_; @@ -23,7 +24,7 @@ sub sig_printtext { (($dest->{level} & (MSGLEVEL_PUBLIC)) || ($dest->{level} & (MSGLEVEL_MSGS))) && ($text =~ qr#((?:https?://[^\s<>"]+|www\.[-a-z0-9.]+)[^\s.,;<">\):])# ) ) { - $window = Irssi::window_find_name('urls'); + my $window = Irssi::window_find_name('urls'); if ($dest->{level} & MSGLEVEL_PUBLIC) { $text = $dest->{target}.": ".$text; @@ -37,7 +38,7 @@ sub sig_printtext { } } -$window = Irssi::window_find_name('urls'); +my $window = Irssi::window_find_name('urls'); if (!$window){ $window = Irssi::Windowitem::window_create('urls', 1);