]> jfr.im git - irssi-scripts.git/blobdiff - screen_away.pl
no autorun smshilight
[irssi-scripts.git] / screen_away.pl
index 86e3087b63d0f265e6c3c8b78597a630616e56d0..90d5d22da6eacb97f5f21659d329ea577076d6d8 100644 (file)
@@ -101,7 +101,8 @@ if ($socket !~ /^No Sockets found/s) {
   # ok, should have only one socket
   $socket_name = $ENV{'STY'};
   $socket_path = $socket;
-  $socket_path =~ s/^.+\d+ Sockets? in ([^\n]+)\.\n.+$/$1/s;
+                    #1 Socket in /run/screen/S-jrunyon.
+  $socket_path =~ s/^.*\d+ Sockets? in ([^\n]+)\.\s.+$/$1/s;
   if (length($socket_path) != length($socket)) {
     # only activate, if string length is different
     # (to make sure, we really got a dir name)
@@ -110,8 +111,7 @@ if ($socket !~ /^No Sockets found/s) {
     Irssi::printformat(MSGLEVEL_CLIENTCRAP, 'screen_away_crap',
       "error reading screen informations from:");
     Irssi::printformat(MSGLEVEL_CLIENTCRAP, 'screen_away_crap',
-      "$socket");
-    return;
+      "$socket_path/$socket");
   }
 }