aboutsummaryrefslogtreecommitdiff
path: root/lib/mauve/notifiers
diff options
context:
space:
mode:
authorPatrick J Cherry <patrick@bytemark.co.uk>2011-10-14 14:54:34 +0100
committerPatrick J Cherry <patrick@bytemark.co.uk>2011-10-14 14:54:34 +0100
commit4f453dea9fffe8171c7585041b9a136c3a8b8fda (patch)
tree613c6b88d5035605d82ae78b45841cba5e443dc8 /lib/mauve/notifiers
parentae7f0891675ce1fdafa0c2b8e880576fc621fb99 (diff)
Changed ack xmpp command to split on non-digit characters, rather than just commas.
Diffstat (limited to 'lib/mauve/notifiers')
-rw-r--r--lib/mauve/notifiers/xmpp.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/mauve/notifiers/xmpp.rb b/lib/mauve/notifiers/xmpp.rb
index fa1751c..16c47bb 100644
--- a/lib/mauve/notifiers/xmpp.rb
+++ b/lib/mauve/notifiers/xmpp.rb
@@ -566,11 +566,11 @@ EOF
def do_parse_ack(msg)
return "Sorry -- I don't understand your acknowledge command." unless
- msg.body =~ /ack(?:nowledge)?\s+([\d,]+)\s+for\s+(\d+(?:\.\d+)?)\s+(work(?:ing)?|day(?:time)?|wall(?:-?clock)?)?\s*(day|hour|min(?:ute)?|sec(?:ond))s?(?:\s+because\s+(.*))?/i
+ msg.body =~ /ack(?:nowledge)?\s+([\d\D]+)\s+for\s+(\d+(?:\.\d+)?)\s+(work(?:ing)?|day(?:time)?|wall(?:-?clock)?)?\s*(day|hour|min(?:ute)?|sec(?:ond))s?(?:\s+because\s+(.*))?/i
alerts, n_hours, type_hours, dhms, note = [$1,$2, $3, $4, $5]
- alerts = alerts.split(",")
+ alerts = alerts.split(/\D/)
n_hours = case dhms
when /^day/