diff options
-rw-r--r-- | prompt_info/uberprompt.pl | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/prompt_info/uberprompt.pl b/prompt_info/uberprompt.pl index 41803d8..8a9f50b 100644 --- a/prompt_info/uberprompt.pl +++ b/prompt_info/uberprompt.pl @@ -235,10 +235,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 +273,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) { |