From 33cdc62a2817194beca14fbddfd8b3def7d7c4d3 Mon Sep 17 00:00:00 2001 From: mh Date: Tue, 8 Dec 2015 21:52:52 +0100 Subject: mh_sbsplitmode.pl v1.03 provides a statusbar item showing if your server is in splitmode and /splitmode to show details changes cleaned up useless code--- scripts/mh_sbsplitmode.pl | 23 +++++++---------------- 1 file changed, 7 insertions(+), 16 deletions(-) (limited to 'scripts') diff --git a/scripts/mh_sbsplitmode.pl b/scripts/mh_sbsplitmode.pl index 9dd173c..cc33cd0 100644 --- a/scripts/mh_sbsplitmode.pl +++ b/scripts/mh_sbsplitmode.pl @@ -1,6 +1,6 @@ ############################################################################## # -# mh_sbsplitmode.pl v1.02 (20151207) +# mh_sbsplitmode.pl v1.03 (20151208) # # Copyright (c) 2015 Michael Hansen # @@ -49,6 +49,8 @@ # see '/help statusbar' for more details and do not forget to '/save' # # history: +# v1.03 (20151208) +# cleaned up useless code. # v1.02 (20151207) # fixed bug where the timeout never got started # added a few comments @@ -72,7 +74,7 @@ use strict; use Irssi 20100403; use Irssi::TextUI; -our $VERSION = '1.02'; +our $VERSION = '1.03'; our %IRSSI = ( 'name' => 'mh_sbsplitmode', @@ -337,18 +339,6 @@ sub command_splitmode } } -Irssi::timeout_add_once(10, 'timeout_request_stats_d', undef); - -Irssi::signal_add('redir mh_sbsplitmode stats d', 'signal_redir_stats_d'); - -Irssi::signal_add_last('event connected', 'request_stats_d'); - -Irssi::signal_add('server disconnected', 'state_remove_server'); - -Irssi::signal_add_last('setup changed', 'signal_setup_changed_last'); - -Irssi::command_bind('splitmode', 'command_splitmode', 'mh_sbsplitmode'); - sub command_help { my ($data, $server, $windowitem) = @_; @@ -458,9 +448,10 @@ Irssi::signal_add('server disconnected', 'state_remove_server'); Irssi::signal_add_last('setup changed', 'signal_setup_changed_last'); Irssi::command_bind('splitmode', 'command_splitmode', 'mh_sbsplitmode'); -Irssi::command_bind('help', 'command_help'); +Irssi::command_bind('help', 'command_help'); + +timeout_request_stats_d(); -Irssi::timeout_add_once(10, 'timeout_request_stats_d', undef); 1; ############################################################################## -- cgit v1.2.3