Skip to content

Instantly share code, notes, and snippets.

@itochan
Created June 17, 2011 07:48
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save itochan/1031038 to your computer and use it in GitHub Desktop.
Save itochan/1031038 to your computer and use it in GitHub Desktop.
#!/usr/bin/env ruby
# coding: utf-8
#
# itochan IRCbot script
# thanks: http://www.olnr.org/~omote/blog/
$LOAD_PATH << "lib"
$LOAD_PATH << "../lib"
require "rubygems"
require "net/irc"
require "pp"
class ItochanBot < Net::IRC::Client
def initialize(*args)
super
end
def on_rpl_welcome(m)
puts "Welcome message recived"
post JOIN, "#itoland_two@fchat"
end
def on_privmsg(m)
pp m
post NOTICE, m[0], m[1]
end
end
ItochanBot.new("ito315.com", "6667", {
:nick => "itochan",
:user => "itochan",
:real => "itochan",
:pass => "ugaguagaguaguagaga",
}).start
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment