From: zdleaf Date: Thu, 24 Oct 2019 20:10:01 +0000 (+0100) Subject: amended regexp to include ftp and gopher links X-Git-Url: http://git.99rst.org/?a=commitdiff_plain;h=d395928cf7c2c43b4c57dc34d28bdc2a54e5b8f0;p=irssi-scripts.irssi.org.git amended regexp to include ftp and gopher links --- diff --git a/scripts/urlwindow.pl b/scripts/urlwindow.pl index 3f9e676..b28310d 100644 --- a/scripts/urlwindow.pl +++ b/scripts/urlwindow.pl @@ -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');