dominikh / silverplatter-irc forked from apeiros/silverplatter-irc

A fully fledged irc library and framework (you can use it in either style)

This URL has Read+Write access

lenary (author)
Mon Jan 05 11:21:05 -0800 2009
dominikh (committer)
Wed Jan 14 06:14:55 -0800 2009
name age message
file .gitignore Fri Jul 04 09:52:39 -0700 2008 ignores xcode files [Stefan Rusterholz]
file README.rdoc Sun Jul 06 08:26:46 -0700 2008 added stuff to README [apeiros]
directory online/ Loading commit data...
directory stuff/ Thu Jun 19 03:37:09 -0700 2008 minor changes, added loc.rb and irccat.rb [apeiros]
directory trunk/
README.rdoc

SilverPlatter::IRC

Indexing

Author:Stefan Rusterholz <apeiros@gmx.net>
Version:1.0.0
Website:silverplatter.rubyforge.org/irc
License:Ruby License (see LICENSE.txt)

Summary

SilverPlatter::IRC is an easy to use library for IRC clients. For an example use take a look at the butler project: butler.rubyforge.org which uses it to implement an IRC bot.

Description

FIXME

Installing

Via RubyGems

You need for the installation:

  • rubygems >= 1.2.0
  • silverplatter-log >= 0.1.0 (automatically installed by rubygems)

You need for some of the rake tasks:

  • bacon
  • flexmock
  • git
  • hpricot
  • rcov
  • rdiscount (or markdown)
  • rdoc
  • rspec

To install, do:

        gem install silverplatter-irc

Note: you might have to use ‘sudo gem install silverplatter-irc’

From Github

You need for the installation:

  • rubygems >= 1.2.0 (if you want to use any gem tasks)
  • hpricot >= 0.6.0 (needed for most rake tasks)
  • rdoc >= 2.0.0 (needed for most rake tasks)
  • silverplatter-log >= 0.1.0

You need for some of the rake tasks:

  • bacon
  • flexmock
  • git
  • hpricot
  • rcov
  • rdiscount (or markdown)
  • rdoc
  • rspec

To install, do:

        curl http://github.com/apeiros/silverplatter-irc/tarball/master
        cd trunk
        rake gem:install

Note: you might have to use ‘sudo rake gem:install’

Examples

See in the examples dir for code examples.

Design

SilverPlatter::IRC is designed in layers, the following layers exist:

Socket:Provides many abstracted write methods and send-queues to protect your client from accidentally flooding (sending too many messages at once) Reading messages will only give a string
Connection:Provides imperative and evented interfaces to reading commands, which additionally are converted to IRC::Message’s and provide a nicer interface than plain Strings. Keeps track of IRC::User’s you’re talking to (or that talk to you) and IRC::Channel’s you’re in. Both, IRC::User and IRC::Channel are multitons, that means a given user or channel will always be represented by the same object.
Client:Deals with multiple connections

Socket only provides the simplemost functionality and is "dumb" by design (no automatisms). Connection is sufficient to build a client allowing a connection to a single server at a time and is semi-intelligent as Parser, Channel and Users are tied to the connection and automatically updated apropriatly. Also it can properly deal with requests with multiple commands as reply, collecting those and making them accessible in a nice format. Client enables multiple connections in a nice manner.

Contributing

If you wish to contribute, then there are various ways to do so:

Code:If you wish to contribute code, simply fork the github project, clone and start to work. Contact me when you think your modifications are ready to be pulled into the master branch. Notice that all patches are required to be under the Ruby License or public domain.
Feedback:Please give feedback on the libs. ALL feedback is good. Positive feedback to keep the motivation up, negative (but constructive!) feedback to improve the code-base.
Testing:Testrun silverplatter-irc on different IRC servers and collect logged exceptions
SSL:Have a server with SSL to connect to? Tell me, I’d very much like to try enable ssl connections.

Links

SilverPlatter-IRCs home:silverplatter.rubyforge.org/irc
The project site:rubyforge.org/projects/silverplatter