1 Minute Post: AIM Bot in Ruby

Was searching for how to do an AIM Bot in Ruby tonight. Screwed around a bit with ROscar and Raimbot. But the light at the end of the tunnel is here: Net::TOC.

1
gem install -r net-toc

Example bot.rb:

1
2
3
4
5
6
7
require 'rubygems'
require 'net/toc'

# "aimbot99" needs to be a real AIM username, get one at aim.aol.com
Net::TOC.new("aimbot99", "mypass") do |msg, buddy|
  buddy.send_im("You said: #{msg}")
end

Run:

1
~/dev/aim-bot $ ruby bot.rb

Yeah, you can take it from there :)

Comments