]> git.99rst.org Git - irssi-scripts.irssi.org.git/commitdiff
added use strict
authorzdleaf <redacted>
Sun, 16 Sep 2018 10:31:07 +0000 (11:31 +0100)
committerzdleaf <redacted>
Sun, 16 Sep 2018 10:31:07 +0000 (11:31 +0100)
scripts/urlwindow.pl

index c485427afd5515ceede2a3861ddca8ed688dc334..3f9e6769c319e963efbe6b6059a1a4b7b89f3b0f 100644 (file)
@@ -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);
git clone https://git.99rst.org/PROJECT