aboutsummaryrefslogtreecommitdiff
path: root/lib/mauve/notifier.rb
diff options
context:
space:
mode:
authorPatrick J Cherry <patrick@bytemark.co.uk>2011-07-22 16:55:01 +0100
committerPatrick J Cherry <patrick@bytemark.co.uk>2011-07-22 16:55:01 +0100
commitfd23821950f0562a8995735105cd31fdc6d55933 (patch)
tree967df2f5647803a6c46f4d52003b2231c1de72cb /lib/mauve/notifier.rb
parentd3a3cfef9650b08f62db62bd7e86b673f9d77d0b (diff)
* Rejigged configuration
* Added --test and --verbose flags for the server config * Started proper test suite * Config parsing now gives more sensible errors + backtrace * Rejigged people and source lists
Diffstat (limited to 'lib/mauve/notifier.rb')
-rw-r--r--lib/mauve/notifier.rb10
1 files changed, 7 insertions, 3 deletions
diff --git a/lib/mauve/notifier.rb b/lib/mauve/notifier.rb
index 6099457..1c3bf9b 100644
--- a/lib/mauve/notifier.rb
+++ b/lib/mauve/notifier.rb
@@ -8,8 +8,6 @@ module Mauve
include Singleton
- attr_accessor :sleep_interval
-
def main_loop
#
# Cycle through the buffer.
@@ -48,7 +46,7 @@ module Mauve
# Connect to XMPP server
#
xmpp = Configuration.current.notification_methods['xmpp']
- xmpp.connect
+ xmpp.connect
Configuration.current.people.each do |username, person|
#
@@ -74,6 +72,12 @@ module Mauve
def stop
super
+
+ #
+ # Flush the queue.
+ #
+ main_loop
+
if Configuration.current.notification_methods['xmpp']
Configuration.current.notification_methods['xmpp'].close
end