Junkone
4/24/2008 8:23:00 PM
i have a strange prob. when i run this code under irb, the buddy can
recieve the message. when i run it under the ruby commandline, the
buddy does not recive the message. i am not sure what the difference
is.
any pointers is appreciated.
require 'net/toc'
client = Net::TOC.new("userid","password")
client.connect
client.wait(10)
friend = client.buddy_list.buddy_named("mybuddy1")
client.on_im do | message, buddy |
puts "#{buddy.screen_name}: #{message}"
end
client.on_error do | error |
puts "!! #{error}"
end
friend.send_im(" hi how going") # not sure why this is not being
sent.
puts client.buddy_list.to_s
client.disconnect()