]> git.99rst.org Git - irssi-scripts.irssi.org.git/commitdiff
amended regexp to include ftp and gopher links
authorzdleaf <redacted>
Thu, 24 Oct 2019 20:10:01 +0000 (21:10 +0100)
committerzdleaf <redacted>
Thu, 24 Oct 2019 20:10:01 +0000 (21:10 +0100)
scripts/urlwindow.pl

index 3f9e6769c319e963efbe6b6059a1a4b7b89f3b0f..b28310d2bfefeae101ca15ea7213f40f542bf62a 100644 (file)
@@ -21,7 +21,8 @@ sub sig_printtext {
     my ($dest, $text, $stripped) = @_;
     
     if(
-        (($dest->{level} & (MSGLEVEL_PUBLIC)) || ($dest->{level} & (MSGLEVEL_MSGS))) && ($text =~ qr#((?:https?://[^\s<>"]+|www\.[-a-z0-9.]+)[^\s.,;<">\):])# ) 
+        (($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');
git clone https://git.99rst.org/PROJECT