#!/usr/bin/ruby # # Copyright 2007 David Shakaryan # Distributed under the terms of the GNU General Public License v2. require 'socket' require 'dinolib.rb' # Connect to server and send initial post-connect messages. $socket = TCPSocket.new('irc.freenode.net', 6667) out('USER dinobot omp scht :dinobot.rb (by omp)') out('Nick dinobot') while !$socket.closed? # Parse current line. parse($socket.readline.chomp) end