]> git.99rst.org Git - irssi-scripts.irssi.org.git/commitdiff
[inputlength] use warnings inputlength_countdown_auto
authorGeorgios Kontaxis <redacted>
Sun, 16 Aug 2026 10:27:14 +0000 (10:27 +0000)
committerGeorgios Kontaxis <redacted>
Sun, 16 Aug 2026 11:28:47 +0000 (11:28 +0000)
scripts/il.pl

index b4854c32220a9a5189403b13f106260ed28742dc..dc1265deaf1d75452d2bb78d8b437aa3891f2b08 100644 (file)
@@ -23,6 +23,8 @@
 #
 
 use strict;
+use warnings;
+
 use Irssi 20021105;
 use Irssi::TextUI;
 
@@ -132,9 +134,9 @@ sub beancounter {
        #
        # did we have a number?
        #
-       $length =~ s/$padChar/$padNum/g if ( $padNum ne '' );
+       $length =~ s/$padChar/$padNum/g if ( defined $padNum && $padNum ne '' );
 
-       $sbItem->default_handler ( $get_size_only, "{sb $length}", undef, 1 );
+       $sbItem->default_handler ( $get_size_only, "{sb $length}", "", 1 );
 }
 
 Irssi::statusbar_item_register ( 'inputlength', 0, 'beancounter' );
git clone https://git.99rst.org/PROJECT