0.3.1 • Published 11 years ago

ircb v0.3.1

Weekly downloads
36
License
-
Repository
github
Last release
11 years ago

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');
});
0.3.1

11 years ago

0.3.0

11 years ago

0.2.0

11 years ago

0.1.5

11 years ago

0.1.4

11 years ago

0.1.3

11 years ago

0.1.2

11 years ago

0.1.1

11 years ago

0.1.0

11 years ago