aboutsummaryrefslogtreecommitdiffstats
path: root/prompt_info
diff options
context:
space:
mode:
authorTom Feist <shabble@metavore.org>2010-10-09 21:10:20 +0000
committerTom Feist <shabble@metavore.org>2010-10-09 21:10:20 +0000
commitd2e68afdbcf321b2051269e4419478eb7bccc387 (patch)
tree69ac421011925e0cce12614bed9b3ccff9ff7f2c /prompt_info
parentadded doc about uberprompt_format setting (diff)
downloadirssi-scripts-d2e68afdbcf321b2051269e4419478eb7bccc387.tar.gz
irssi-scripts-d2e68afdbcf321b2051269e4419478eb7bccc387.zip
added uberprompt_debug as an irssi setting. defaults to off.
Diffstat (limited to 'prompt_info')
-rw-r--r--prompt_info/uberprompt.pl10
1 files changed, 8 insertions, 2 deletions
diff --git a/prompt_info/uberprompt.pl b/prompt_info/uberprompt.pl
index a192780..d5f66b2 100644
--- a/prompt_info/uberprompt.pl
+++ b/prompt_info/uberprompt.pl
@@ -97,8 +97,10 @@ our %IRSSI =
changed => "24/7/2010"
);
-sub DEBUG () { 1 }
-#sub DEBUG () { 0 }
+
+my $DEBUG_ENABLED = 0;
+
+sub DEBUG { $DEBUG_ENABLED }
my $prompt_data = undef;
@@ -117,6 +119,7 @@ sub init {
Irssi::statusbar_item_register('uberprompt', 0, 'uberprompt_draw');
Irssi::settings_add_str('uberprompt', 'uberprompt_format', '[$*] ');
+ Irssi::settings_add_bool('uberprompt', 'uberprompt_debug', 0);
Irssi::command_bind("prompt", \&prompt_subcmd_handler);
Irssi::command_bind('prompt on', \&replace_prompt_items);
@@ -179,6 +182,9 @@ sub UNLOAD {
}
sub reload_settings {
+
+ $DEBUG_ENABLED = Irssi::settings_get_bool('uberprompt_debug');
+
my $new = Irssi::settings_get_str('uberprompt_format');
if ($prompt_format ne $new) {
print "Updated prompt format" if DEBUG;