BaseIRC
BaseIRC is a very simple library for talking to an IRC server. The only thing this library provides is the outgoing communication from your application. (If you are looking to handle incoming messages take a look at the MessageFactory library.)
install (easy):
gem install baseirc
install (less easy)
git clone http://github.com/spox/baseirc.git
cd baseirc
gem build *.gemspec
gem install ./
install (less easy that’s a little easier)
rip makes it easy to install directly from a github repository.
Testing
BaseIRC is currently tested on:
-
Ruby 1.8.6-p383
-
Ruby 1.8.7-p248
-
Ruby 1.9.1-p376
-
JRuby 1.4.0
Example
Code:
require 'baseirc'
socket = []
irc = BaseIRC::IRC.new(socket)
irc.privmsg('spox', 'hi')
p socket
Result:
["PRIVMSG spox :hi"]
The BaseIRC::IRC object takes a socket, or socket like, object. The only thing the library requires of this object is that it has << defined.
Last remarks
If you find any bugs, please report them through github. If you are in need of any help, you can generally find me on DALnet and Freenode.
License
BaseIRC is licensed under the MIT License
Copyright (c) 2009 spox <[email protected]>