summaryrefslogtreecommitdiff
path: root/lib/oxidized/hook/xmppdiff.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/oxidized/hook/xmppdiff.rb')
-rw-r--r--lib/oxidized/hook/xmppdiff.rb18
1 files changed, 9 insertions, 9 deletions
diff --git a/lib/oxidized/hook/xmppdiff.rb b/lib/oxidized/hook/xmppdiff.rb
index 52cc0e0..6acb172 100644
--- a/lib/oxidized/hook/xmppdiff.rb
+++ b/lib/oxidized/hook/xmppdiff.rb
@@ -30,25 +30,25 @@ class XMPPDiff < Oxidized::Hook
sleep 1
client.auth(cfg.password)
sleep 1
-
+
log "Connected"
-
+
m = Jabber::MUC::SimpleMUCClient.new(client)
m.join(cfg.channel + "/" + cfg.nick)
-
+
log "Joined"
-
+
title = "#{ctx.node.name} #{ctx.node.group} #{ctx.node.model.class.name.to_s.downcase}"
log "Posting diff as snippet to #{cfg.channel}"
-
+
m.say(title + "\n\n" + diff[:patch].lines.to_a[4..-1].join)
-
+
sleep 1
-
+
client.close
-
+
log "Finished"
-
+
end
end
rescue Timeout::Error