diff options
| author | mh | 2015-12-08 21:52:52 +0100 | 
|---|---|---|
| committer | mh | 2015-12-08 21:52:52 +0100 | 
| commit | 33cdc62a2817194beca14fbddfd8b3def7d7c4d3 (patch) | |
| tree | b92adbd9c65ee1a3700c56f7db67af7c935c29f7 | |
| parent | 38aa1649c433753d2255797ded80f509bad8e65c (diff) | |
| download | scripts.irssi.org-33cdc62a2817194beca14fbddfd8b3def7d7c4d3.tar.bz2 | |
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
| -rw-r--r-- | scripts/mh_sbsplitmode.pl | 23 | 
1 files changed, 7 insertions, 16 deletions
| 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;  ############################################################################## | 
