Neutron Polarization Manipulator
    Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

    ircb.iopublic

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

    Keywords

    none

    install

    npm i ircb.io

    Downloadsweekly downloads

    2

    version

    0.0.0

    license

    none

    repository

    githubgithub

    last publish

    collaborators

    • avatar
    • avatar