There you go.
require 'rubygems'
require 'xmpp4r'
require 'xmpp4r/roster'
puts 'Connecting ...'
client = Jabber::Client.new(ARGV[0]).connect(’talk.google.com’)
client.auth(ARGV[1])
puts ‘Receiving’
roster = Jabber::Roster::Helper.new(client)
roster.add_presence_callback do |roster_item, old_presence, new_presence|
if new_presence
from = roster_item.iname || “#{new_presence.from.node}@#{new_presence.from.domain}”
if new_presence.status
puts “#{from}: #{new_presence.status}”
end
end
end
client.send(Jabber::Presence.new)
Thread.stop
client.close
Run from the command line:
$ ruby distwit.rb <jabber_id> <password>
Connecting …
Receiving
Andre Lewis: Away
Matthieu Riou: Enjoying a JavaOne couch
Matthieu Riou: Entertaining Assaf
Alexis Midon: hacking in a couch @community-one
Now just wait for your friends to status away using their IM client.
And don’t forget, please yo-yo the rrm.

Joe Cascio
May 6th, 2008 at 11:49 am
Erik Kastner
May 7th, 2008 at 5:37 am
Marcus Breese
May 7th, 2008 at 10:45 am
Assaf
May 7th, 2008 at 11:16 am
links for 2008-05-09 « Breyten’s Dev Blog
May 9th, 2008 at 4:31 am