require 'rubygems'
require 'xmpp4r-simple'

include Jabber
@user = Simple.new('JID', 'PASSWORD')
@friends = @user.roster

@user.received_messages do |message|
    puts message + " from : " +message.from
end