ircb

0.3.1 • Public • Published

ircb

Name courtesy of @isaacs.

An IRC library which I like.

Usage

Creating a client

var ircb = require('ircb');
 
var irc = ircb({
  host: 'irc.freenode.org',
  secure: true,
  nick: 'mycoolbot',
  username: 'mycoolbot',
  realName: 'mycoolbot',
  channels: ['#node.js'] // optional
}, function () {
  console.log('Connected');
  console.log('MOTD:\n');
  console.log(irc.motd);
});

Joining a channel

irc.join('#node.js', function (err) {
  if (err) throw err;
  console.log('Joined #node.js');
});

Saying stuff

To a channel

irc.say('#node.js', 'hello world');

To a person

irc.say('mmalecki', 'hello world');

Getting list of people from a channel

irc.names('#node.js', function (err, names) {
  if (err) throw err;
  console.log('There are ' + names.length + ' people in #node.js channel');
});

Readme

Keywords

none

Package Sidebar

Install

npm i ircb

Weekly Downloads

7

Version

0.3.1

License

none

Last publish

Collaborators

  • judgmentparking
  • mmalecki