]> git.cworth.org Git - sup/commitdiff
add a startup hook
authorNicolas Pouillard <nicolas.pouillard@gmail.com>
Tue, 19 Feb 2008 10:17:59 +0000 (11:17 +0100)
committerWilliam Morgan <wmorgan-sup@masanjin.net>
Wed, 20 Feb 2008 02:50:51 +0000 (18:50 -0800)
bin/sup

diff --git a/bin/sup b/bin/sup
index 84fd77c5d07df9b2fc4f16b09cfa17dced6cfbec..efe55777498309c9b0c3fc94a5330d1bcc9a28e7 100644 (file)
--- a/bin/sup
+++ b/bin/sup
@@ -39,6 +39,12 @@ EOS
   opt :compose, "Compose message to this recipient upon startup", :type => String
 end
 
+Redwood::HookManager.register "startup", <<EOS
+Executes at startup
+No variables.
+No return value.
+EOS
+
 if $opts[:list_hooks]
   Redwood::HookManager.print_hooks
   exit
@@ -128,6 +134,8 @@ begin
     Index.add_source SentManager.new_source
   end
 
+  HookManager.run "startup"
+
   log "starting curses"
   start_cursing