Created
June 17, 2011 07:48
-
-
Save itochan/1031038 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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