diff options
author | Patrick J Cherry <patrick@bytemark.co.uk> | 2011-07-13 16:44:17 +0100 |
---|---|---|
committer | Patrick J Cherry <patrick@bytemark.co.uk> | 2011-07-13 16:44:17 +0100 |
commit | e07cea09e884607d6ad005f5e2822251ca31b9ba (patch) | |
tree | afc3aee746bb36c28e59d5f7b0f6dd896824307f /lib | |
parent | e140af144e987ff7f6d767f2dc48b9cf685803fd (diff) |
Further tweaks.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/mauve/alert.rb | 2 | ||||
-rw-r--r-- | lib/mauve/alert_changed.rb | 5 | ||||
-rw-r--r-- | lib/mauve/notifiers/xmpp.rb | 8 | ||||
-rw-r--r-- | lib/mauve/processor.rb | 2 |
4 files changed, 7 insertions, 10 deletions
diff --git a/lib/mauve/alert.rb b/lib/mauve/alert.rb index 164139b..147c7cb 100644 --- a/lib/mauve/alert.rb +++ b/lib/mauve/alert.rb @@ -404,8 +404,6 @@ module Mauve # # Make sure that we raise if neither raise nor clear is set # - logger.warn("No clear time or raise time set. Assuming raised!") - raise_time = reception_time end diff --git a/lib/mauve/alert_changed.rb b/lib/mauve/alert_changed.rb index 740b9dc..4dcba8e 100644 --- a/lib/mauve/alert_changed.rb +++ b/lib/mauve/alert_changed.rb @@ -92,7 +92,6 @@ module Mauve end - logger.info "Reminding someone about #{self.inspect}" alert_group = AlertGroup.matches(alert)[0] @@ -100,11 +99,13 @@ module Mauve logger.info((alert_group ? "Alert already acknowledged" : "No alert group matches any more" - ) + ", no reminder due" + ) + " => no reminder due for #{self.alert.inspect}" ) self.remind_at = nil save else + logger.info "Sending a reminder for #{self.alert.inspect}" + saved = false unless alert_group.notifications.nil? diff --git a/lib/mauve/notifiers/xmpp.rb b/lib/mauve/notifiers/xmpp.rb index 8131096..34cc815 100644 --- a/lib/mauve/notifiers/xmpp.rb +++ b/lib/mauve/notifiers/xmpp.rb @@ -258,12 +258,12 @@ module Mauve # Joins a chat, and returns the stripped JID of the chat joined. # def join_muc(jid, password=nil) - if jid.is_a?(String) - jid = JID.new($1) if jid =~ /^muc:(.*)/ + if jid.is_a?(String) and jid =~ /^muc:(.*)/ + jid = JID.new($1) end unless jid.is_a?(JID) - logger.warn "I don't think #{jid} is a MUC" + logger.warn "#{jid} is not a MUC" return end @@ -271,7 +271,7 @@ module Mauve if !@mucs[jid.strip] - logger.info("Adding new MUC client for #{jid}") + logger.debug("Adding new MUC client for #{jid}") @mucs[jid.strip] = Jabber::MUC::MUCClient.new(@client) diff --git a/lib/mauve/processor.rb b/lib/mauve/processor.rb index f36dacb..a1c0896 100644 --- a/lib/mauve/processor.rb +++ b/lib/mauve/processor.rb @@ -38,8 +38,6 @@ module Mauve Timer.instance.freeze unless Timer.instance.frozen? - raise ArgumentError, "arse" - logger.debug("Got #{data.inspect} from #{client.inspect}") ip_source = "#{client[3]}:#{client[1]}" |