Add channel support to irc-connect


Channel features for irc-connect.

var channels = require('irc-channels');
var irc = require("irc-connect");
    .use(irc.pong, channels)
    .on('welcome', function (msg) {
        this.join('#node.js', function(channel){
            channel.on('data', function (event) {
            channel.msg('I got working!');

It is an EventEmitter with some extras.

A proxy to irc-connect's send() function; It sends the text followed by a \n.

Gets the name of the channel.

Sends a PRIVMSG to the channel.

Leave the channel.

Gets current topic of the channel. Returns an object.

console.log(JSON.stringify(channel.topic, null, 2));
//  "message": "Hello irc-connect ppl", 
//  "by": "wwicks!~wwicks@", 
//  "at": "1379547726" 

Gets and Array of the current channel members. The list is updated when QUIT | JOIN | PART happen.

The channel will emit the following channel specific events:

Emitted anytime the names list has been parsed for this channel.