[ create a new paste ] login | about

Link: http://codepad.org/vfgr7FrZ    [ raw code | fork ]

Ruby, pasted on Jan 24:
#!/usr/bin/ruby/
require 'socket'

unless ARGV.length == 2
        puts "usage: ruby rirc.rb <host> <channel>"
        exit
end

host = ARGV[0]
channel = ARGV[1]

sock = TCPSocket.open(host, 6667)

sock.send "NICK wowwbot\r\n"
sock.send "USER wowwbot {host} the bot :Brobot\r\n"
sock.send "JOIN {channel}\r\n"

while line = sock.gets
        puts line.chomp
end

sock.close


Create a new paste based on this one


Comments: