From 83f7f7bfa1cc99539931ae922fef3fd0efdca388 Mon Sep 17 00:00:00 2001 From: mh Date: Fri, 27 Nov 2015 20:31:05 +0100 Subject: mh_sbuserinfo.pl v1.02 statusbar item that shows users and limit info in channels changes: only show item when channel is synced cleaned out redundant code--- scripts/mh_sbuserinfo.pl | 20 ++++++-------------- 1 file changed, 6 insertions(+), 14 deletions(-) (limited to 'scripts') diff --git a/scripts/mh_sbuserinfo.pl b/scripts/mh_sbuserinfo.pl index 75089da..f1561bb 100644 --- a/scripts/mh_sbuserinfo.pl +++ b/scripts/mh_sbuserinfo.pl @@ -1,6 +1,6 @@ ############################################################################## # -# mh_sbuserinfo.pl v1.01 (20151127) +# mh_sbuserinfo.pl v1.02 (20151127) # # Copyright (c) 2015 Michael Hansen # @@ -55,6 +55,9 @@ # see '/help statusbar' for more details and do not forget to '/save' # # history: +# v1.02 (20151127) +# only show item when channel is synced +# cleaned out redundant code # v1.01 (20151127) # call statusbar_redraw directly in signals # now using elsif @@ -76,7 +79,7 @@ use strict; use Irssi 20100403; use Irssi::TextUI; -our $VERSION = '1.01'; +our $VERSION = '1.02'; our %IRSSI = ( 'name' => 'mh_sbuserinfo', @@ -248,21 +251,10 @@ sub statusbar_userinfo $format = $format . $limit . '%n'; } - - } else { - - $format = '?' } } - if ($format ne '') - { - $statusbaritem->default_handler($get_size_only, '{sb ' . $format . '}', '', 0); - - } else { - - $statusbaritem->default_handler($get_size_only, '{sb }', '', 0); - } + $statusbaritem->default_handler($get_size_only, '{sb ' . $format . '}', '', 0); } ############################################################################## -- cgit v1.2.3