Code Monkey home page Code Monkey logo

net-irc's Introduction

= 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)
			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 <http://arika.org/ruby/rice> written by akira yamada.

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

net-irc's People

Contributors

cho45 avatar drry avatar elim avatar hirose31 avatar kga avatar psychs avatar riaf avatar shunirr avatar smbd avatar sotarok avatar tokuhirom avatar walf443 avatar yappo avatar yugui avatar znz avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.