]> git.99rst.org Git - irssi-scripts.irssi.org.git/commitdiff
fix formatting
authorZachary Leaf <redacted>
Mon, 14 Nov 2022 22:19:16 +0000 (22:19 +0000)
committerZachary Leaf <redacted>
Mon, 14 Nov 2022 22:27:13 +0000 (22:27 +0000)
scripts/urlwindow.pl

index 89a2134702796c4120af245a397e5055ec4d8f41..faea05819b61c91433aa8e2c1022ecf9a6de4af2 100644 (file)
@@ -7,10 +7,10 @@ use POSIX;
 use vars qw($VERSION %IRSSI);
 use strict;
 
-$VERSION = "1.2";
+$VERSION = "1.3";
 %IRSSI = (
     authors     => "zdleaf",
-    contact     => 'zdleaf@zinc.london', 
+    contact     => 'zdleaf@zinc.london',
     name        => "urlwindow",
     description => "Log all urls from #channels and /msgs in a separate window",
     license     => "Public Domain",
@@ -19,18 +19,17 @@ $VERSION = "1.2";
 
 sub sig_printtext {
     my ($dest, $text, $stripped) = @_;
-    
-    if(
-        (($dest->{level} & (MSGLEVEL_PUBLIC)) || ($dest->{level} & (MSGLEVEL_MSGS))) && ($text =~ qr#((?:(https?|gopher|ftp)://[^\s<>"]+|www\.[-a-z0-9.]+)[^\s.,;<">\):])# )
 
-               ) 
-               {
+    if((($dest->{level} & (MSGLEVEL_PUBLIC)) || ($dest->{level} & (MSGLEVEL_MSGS)))
+    && ($text =~
+        qr#((?:(https?|gopher|ftp)://[^\s<>"]+|www\.[-a-z0-9.]+)[^\s.,;<">\):])# ))
+       {
         my $window = Irssi::window_find_name('urls');
-        
+
         if ($dest->{level} & MSGLEVEL_PUBLIC) {
             $text = $dest->{target}.": ".$text;
         }
-               
+
         $text = strftime(
             Irssi::settings_get_str('timestamp_format')." ",
             localtime
@@ -41,7 +40,7 @@ sub sig_printtext {
 
 my $window = Irssi::window_find_name('urls');
 
-if (!$window){
+if (!$window) {
        $window = Irssi::Windowitem::window_create('urls', 1);
        $window->set_name('urls');
        }
git clone https://git.99rst.org/PROJECT