Skip to content

Instantly share code, notes, and snippets.

@jsierles
Created August 3, 2008 07:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jsierles/3808 to your computer and use it in GitHub Desktop.
Save jsierles/3808 to your computer and use it in GitHub Desktop.
client = Client.new(JID.new("..."))
client.connect
client.auth("...")
pres = Presence.new
pres.priority=5
client.send(pres)
puts "I'm online!"
pubnode_news = PubSub::NodeHelper.new(client,"engineyard.com",pubsubnode)
pubnode_news.add_event_callback { |event|
event.items.each_element("item") { |item|
puts item.to_s
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment