# net-irc-0.0.9 Documentation

## 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)
                    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/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"'`

Twitter:

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

Wassr:

    $ ./wig.rb

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

    $ ./tig.rb --help
    Usage: tig.rb [opts]

    Options:
        -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]
            --name

## Copyright

This library is based on RICE <arika.org/ruby/rice> written by akira yamada.

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

## Files

- README

## Classes/Modules

- Net
- Net::IRC
- Net::IRC::Client
- Net::IRC::Client::ChannelManager
- Net::IRC::IRCException
- Net::IRC::Message
- Net::IRC::Message::InvalidMessage
- Net::IRC::Message::ModeParser
- Net::IRC::Message::ServerConfig
- Net::IRC::Prefix
- Net::IRC::Server
- Net::IRC::Server::Session
- Object

## Methods

- ::ctcp_decode — Net::IRC
- ::ctcp_dequote — Net::IRC
- ::ctcp_encode — Net::IRC
- ::ctcp_quote — Net::IRC
- ::new — Net::IRC::Client
- ::new — Net::IRC::Server
- ::new — Net::IRC::Message::ServerConfig
- ::new — Net::IRC::Message::ModeParser
- ::new — Net::IRC::Server::Session
- ::new — Net::IRC::Message
- ::parse — Net::IRC::Message
- ::start — Net::IRC::Server::Session
- #[] — Net::IRC::Message
- #[] — Net::IRC::Message::ServerConfig
- #available_channel_modes — Net::IRC::Server::Session
- #available_user_modes — Net::IRC::Server::Session
- #ctcp? — Net::IRC::Message
- #ctcps — Net::IRC::Message
- #each — Net::IRC::Message
- #extract — Net::IRC::Prefix
- #finish — Net::IRC::Server::Session
- #finish — Net::IRC::Client
- #finish — Net::IRC::Server
- #host — Net::IRC::Prefix
- #init_channel — Net::IRC::Client::ChannelManager
- #inspect — Net::IRC::Message
- #mark_to_op — Net::IRC::Message::ModeParser
- #method_missing — Net::IRC::Server::Session
- #method_missing — Net::IRC::Client
- #nick — Net::IRC::Prefix
- #on_connected — Net::IRC::Client
- #on_connected — Net::IRC::Server::Session
- #on_disconnected — Net::IRC::Server::Session
- #on_disconnected — Net::IRC::Client
- #on_join — Net::IRC::Client::ChannelManager
- #on_kick — Net::IRC::Client::ChannelManager
- #on_message — Net::IRC::Client
- #on_message — Net::IRC::Server::Session
- #on_mode — Net::IRC::Client::ChannelManager
- #on_nick — Net::IRC::Server::Session
- #on_nick — Net::IRC::Client::ChannelManager
- #on_part — Net::IRC::Client::ChannelManager
- #on_pass — Net::IRC::Server::Session
- #on_ping — Net::IRC::Client
- #on_ping — Net::IRC::Server::Session
- #on_quit — Net::IRC::Client::ChannelManager
- #on_rpl_isupport — Net::IRC::Client
- #on_rpl_namreply — Net::IRC::Client::ChannelManager
- #on_rpl_welcome — Net::IRC::Client
- #on_user — Net::IRC::Server::Session
- #parse — Net::IRC::Message::ModeParser
- #server_name — Net::IRC::Server::Session
- #server_version — Net::IRC::Server::Session
- #set — Net::IRC::Message::ServerConfig
- #set — Net::IRC::Message::ModeParser
- #start — Net::IRC::Client
- #start — Net::IRC::Server
- #start — Net::IRC::Server::Session
- #to_a — Net::IRC::Message
- #to_s — Net::IRC::Message
- #to_str — Net::IRC::Message
- #user — Net::IRC::Prefix

[Validate]

Generated with the Darkfish Rdoc Generator 2.