small fix for console irc tty

This commit is contained in:
Harald Hope 2021-03-17 20:14:09 -07:00
parent 1660107ddb
commit 7ecea586ae

5
inxi
View file

@ -12044,7 +12044,10 @@ sub tty_data(){
my $tty_working = $client{'con-irc-tty'}; my $tty_working = $client{'con-irc-tty'};
if ($tty_working ne '' && (my $program = main::check_program('stty'))){ if ($tty_working ne '' && (my $program = main::check_program('stty'))){
my $tty_arg = ($bsd_type) ? '-f' : '-F'; my $tty_arg = ($bsd_type) ? '-f' : '-F';
$tty_working = "tty$tty_working" if main::is_numeric($tty_working); # handle vtnr integers, and tty ID with letters etc.
if (-e "/dev/tty$tty_working"){
$tty_working = "tty$tty_working";
}
$tty = (main::grabber("$program $tty_arg /dev/$tty_working size 2>/dev/null"))[0]; $tty = (main::grabber("$program $tty_arg /dev/$tty_working size 2>/dev/null"))[0];
if ($tty){ if ($tty){
my @temp = split(/\s+/, $tty); my @temp = split(/\s+/, $tty);