Ruby IRC library (Client, Server and many IRC gateways to webservice)
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
examples wassr is finished. thanks you using our service. Oct 21, 2012
lib/net method_missing を定義してしまうと、未定義の変数に気付かなくなる。副作用が強すぎるので削除 Jan 13, 2010
spec update for newest RSpec Feb 2, 2012
.gitignore Updated .gitignore Jul 6, 2008
AUTHORS.txt AUTHORS.txt を生成するように Oct 20, 2009
ChangeLog method_missing を定義してしまうと、未定義の変数に気付かなくなる。副作用が強すぎるので削除 Jan 13, 2010
Rakefile update for newest RSpec Feb 2, 2012


= net-irc

== Description

IRC library. This is mostly conform to RFC 1459 but partly not for convenience.

== Installation

=== Archive Installation

	rake install

=== Gem Installation

	gem install net-irc

== Features/Problems

* IRC client (for bot)
* IRC server (for gateway to webservices)

== Synopsis

=== Client

	require "net/irc"

	class SimpleClient < Net::IRC::Client
		def on_privmsg(m)
			channel, message = *m
			if message =~ /Hello/
				post NOTICE, channel, "Hello!"

Net::IRC::Client manages channel status and the information is set in @channels.
So, be careful to use @channels instance variable and call super surely.

=== Server

see example/tig.rb

== IRC Gateways

There are some gateways connecting to webservices.

* Twitter
* Wassr
* Hatena Haiku
* Hatena Star

If you want to run it, type following:

	$ cd `ruby -rubygems -e 'print Gem.searcher.find("net/irc").full_gem_path+"/examples"'`

	$ ./tig.rb -f >> /dev/null 2>&1

	$ ./wig.rb

Run as daemon in default. If you want to help:

	$ ./tig.rb --help
	Usage: tig.rb [opts]
	    -p, --port [PORT=16668]          port number to listen
	    -h, --host [HOST=localhost]      host name or IP address to listen
	    -l, --log LOG                    log file
	        --debug                      Enable debug mode
	    -f, --foreground                 run foreground
	    -n [user name or email address]

== Copyright

This library is based on RICE <> written by akira yamada.

Author::    cho45 <>
Copyright:: Copyright (c) 2008-2009 cho45
License::   Ruby's