diff options
Diffstat (limited to '')
-rw-r--r-- | prompt_info/uberprompt.pl | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/prompt_info/uberprompt.pl b/prompt_info/uberprompt.pl index 41803d8..c1c4a55 100644 --- a/prompt_info/uberprompt.pl +++ b/prompt_info/uberprompt.pl @@ -117,6 +117,8 @@ use Irssi; use Irssi::TextUI; # for sbar_items_redraw use Data::Dumper; +{ package Irssi::Nick } + our $VERSION = "0.2"; our %IRSSI = ( @@ -235,10 +237,6 @@ sub init { Irssi::signal_register({'prompt length request' => []}); Irssi::signal_add('prompt length request', \&length_request_handler); - - if (DEBUG) { - Irssi::signal_add 'prompt changed', \&debug_prompt_changed; - } } sub refresh_if_me { @@ -277,6 +275,13 @@ sub reload_settings { $DEBUG_ENABLED = Irssi::settings_get_bool('uberprompt_debug'); + if (DEBUG) { + Irssi::signal_add 'prompt changed', 'debug_prompt_changed'; + } else { + Irssi::signal_remove 'prompt changed', 'debug_prompt_changed'; + } + + my $new = Irssi::settings_get_str('uberprompt_format'); if ($prompt_format ne $new) { |