Sha256: ce3b9ce2d77b34da689ce1482a48fc709e46d4ff5c182139bed9063783ced29d

Contents?: true

Size: 1.57 KB

Versions: 7

Compression:

Stored size: 1.57 KB

Contents

= net-irc


== Description

IRC library. This is mostly conform to RFC1459 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)
			super
			channel, message = *m
			if message =~ /Hello/
				post NOTICE, channel, "Hello!"
			end
		end
	end

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/lig.rb


== IRC Gateways

There are some gateways connecting to webservices.

* Lingr
* Twitter
* Wassr

If you want to run it, type following:

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

Lingr:
	$ sudo gem install pit # for configuration
	$ ./lig.rb

Twitter:
	$ ./tig.rb

Wassr:
	$ ./wig.rb

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

	$ ./lig.rb --help
	Usage: ./lig.rb [opts]
	
	
	Options:
	    -p, --port [PORT=16669]          listen port number
	    -h, --host [HOST=localhost]      listen host
	    -l, --log LOG                    log file
	    -a, --api_key API_KEY            Your api key on Lingr
	        --debug                      Enable debug mode


== Copyright

This library is based on RICE ( http://arika.org/ruby/rice ) written by akira yamada.

Author::    cho45 <cho45@lowreal.net>
Copyright:: Copyright (c) 2008 cho45
License::   Ruby's

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
net-irc-0.0.6 README
net-irc-0.0.2 README
net-irc-0.0.3 README
net-irc-0.0.4 README
net-irc-0.0.1 README
net-irc-0.0.5 README
net-irc-0.0.7 README