aboutsummaryrefslogtreecommitdiffstats
path: root/prompt_info/prompt_info.pl
diff options
context:
space:
mode:
authorTom Feist <shabble@cowu.be>2010-09-20 18:48:26 +0000
committerTom Feist <shabble@cowu.be>2010-09-20 18:48:26 +0000
commit2b64353160c3f364267c2228cc9c649e58e2008f (patch)
tree638e91d2732396215f63a2cf41bbb38f86dd5f91 /prompt_info/prompt_info.pl
parentadded 'space' option to scrolled reminder to take you to the end of the (diff)
downloadirssi-scripts-2b64353160c3f364267c2228cc9c649e58e2008f.tar.gz
irssi-scripts-2b64353160c3f364267c2228cc9c649e58e2008f.zip
added a warning message to prompt_info indicating that the user hasn't modified
their prompt theme to include the necessary expando.
Diffstat (limited to '')
-rw-r--r--prompt_info/prompt_info.pl11
1 files changed, 11 insertions, 0 deletions
diff --git a/prompt_info/prompt_info.pl b/prompt_info/prompt_info.pl
index 342b62c..260a9f8 100644
--- a/prompt_info/prompt_info.pl
+++ b/prompt_info/prompt_info.pl
@@ -76,7 +76,18 @@ sub prompt_additional_cmd {
Irssi::signal_emit('change prompt', $str);
}
+test_abstract_setup();
Irssi::signal_register({'change prompt' => [qw/string/]});
Irssi::signal_add('change prompt' => \&handle_change_prompt_sig);
Irssi::command_bind('set_prompt' => \&prompt_additional_cmd);
+
+sub test_abstract_setup {
+ my $theme = Irssi::current_theme();
+ my $prompt = $theme->format_expand('{prompt}', 0);
+ if ($prompt !~ m/\$prompt_additional/) {
+ print "Prompt_Info: It looks like you haven't modified your theme"
+ . " include the \$prompt_additional expando. You will not see"
+ . " any prompt info messages until you do.";
+ }
+}