Sha256: f8feeb91f2cd1c879c8c211ea4f9f8fb3b82e8187cb755ba96e5533193fe5c79

Contents?: true

Size: 444 Bytes

Versions: 1

Compression:

Stored size: 444 Bytes

Contents

#!/usr/bin/env ruby
# vim:fileencoding=UTF-8:

$LOAD_PATH << "lib"
$LOAD_PATH << "../lib"

require "rubygems"
require "net/irc"

require "pp"

class EchoBot < Net::IRC::Client
	def initialize(*args)
		super
	end

  def on_rpl_welcome(m)
    post JOIN, "#bot_test"
  end

  def on_privmsg(m)
    post NOTICE, m[0], m[1]
  end
end

EchoBot.new("foobar", "6667", {
	:nick => "foobartest",
	:user => "foobartest",
	:real => "foobartest",
}).start

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
net-irc-0.0.8 examples/echo_bot.rb