]> git.99rst.org Git - irssi-scripts.irssi.org.git/commitdiff
Edited regex for socket_path search.
authorBenedicte Emilie Brækken <redacted>
Thu, 20 Aug 2015 08:46:58 +0000 (10:46 +0200)
committerBenedicte Emilie Brækken <redacted>
Thu, 20 Aug 2015 08:46:58 +0000 (10:46 +0200)
Changed .+ to .* at both and removed newline character.

scripts/screen_away.pl

index 722ceed5149599961b1c48876fecedf91064bef5..639d8ebc870613ffcf930a3fa59ec63efb16e14f 100644 (file)
@@ -104,7 +104,7 @@ if ($socket !~ /^No Sockets found/s) {
   # therefore first find the pid and use that to find the actual sessionname
   $socket_pid = substr($ENV{'STY'}, 0, index($ENV{'STY'}, '.'));
   $socket_path = $socket;
-  $socket_path =~ s/^.+\d+ Sockets? in ([^\n]+)\.\n.+$/$1/s;
+  $socket_path =~ s/^.*\d+ Sockets? in ([^\n]+)\..*$/$1/s;
   $socket_name = $socket;
   $socket_name =~ s/^.+?($socket_pid\.\S+).+$/$1/s;
   if (length($socket_path) != length($socket)) {
git clone https://git.99rst.org/PROJECT