data = `uptime`.split[7] if (data.to_f >= value.to_f) reply = Jabber::Protocol::Message.new(nil) reply.to = msg.from reply.thread = msg.thread reply.type = msg.type reply.set_body(`uptime`) reply.set_subject("Your uptime request") session.connection.send(reply) end
Example 2: Jabber and Ruby. If load exceeds the threshold, Jabber messages are generated.