All Projects → Throne3d → node-irc

Throne3d / node-irc

Licence: GPL-3.0 license
NodeJS IRC client library

Projects that are alternatives of or similar to node-irc

CloudBot
CloudBot - The simple, fast, expandable, open-source Python IRC Bot!
Stars: ✭ 69 (+64.29%)
Mutual labels:  irc
communi-sailfish
The first and foremost IRC client for Sailfish OS
Stars: ✭ 34 (-19.05%)
Mutual labels:  irc
jj
An evolution of the suckless ii(1) file-based IRC client
Stars: ✭ 80 (+90.48%)
Mutual labels:  irc
critter
Chat bot relaying messages between IRC and Gitter
Stars: ✭ 16 (-61.9%)
Mutual labels:  irc
parser-tests
Tests for IRC Parsers
Stars: ✭ 35 (-16.67%)
Mutual labels:  irc
Limnoria
A robust, full-featured, and user/programmer-friendly Python IRC bot, with many existing plugins. Successor of the well-known Supybot.
Stars: ✭ 578 (+1276.19%)
Mutual labels:  irc
Snooful
The most complete bot for moderation, utility, and fun in Reddit Chat.
Stars: ✭ 13 (-69.05%)
Mutual labels:  irc
TwitchPy
This is a package you can use to connect with the Twitch API, manage a channel, create bots, etc
Stars: ✭ 22 (-47.62%)
Mutual labels:  irc
helpmebot
Helpmebot
Stars: ✭ 16 (-61.9%)
Mutual labels:  irc
mIRC-Twitch-Scripts
Various scripts and games to use with a mIRC bot designed for Twitch.tv
Stars: ✭ 30 (-28.57%)
Mutual labels:  irc
etcdircd
An ircd backed by etcd
Stars: ✭ 76 (+80.95%)
Mutual labels:  irc
newserv
QuakeNet's modular services
Stars: ✭ 20 (-52.38%)
Mutual labels:  irc
framewirc
An IRC toolkit built upon Python 3's asyncio module
Stars: ✭ 36 (-14.29%)
Mutual labels:  irc
freenode-exodus
Projects and channels that have decided to leave Freenode. (Final leave count: 1056)
Stars: ✭ 130 (+209.52%)
Mutual labels:  irc
twitch-chat-bot
No description or website provided.
Stars: ✭ 63 (+50%)
Mutual labels:  irc
jChat
jChat is an overlay that allows you to show your Twitch chat on screen with OBS, XSplit, and any other streaming software that supports browser sources.
Stars: ✭ 106 (+152.38%)
Mutual labels:  irc
phenny
My fork of phenny lives on at https://github.com/vtluug/phenny. This tree is now unmaintained.
Stars: ✭ 15 (-64.29%)
Mutual labels:  irc
ircv3.github.io
IRCv3 website
Stars: ✭ 85 (+102.38%)
Mutual labels:  irc
fluent-plugin-irc
No description or website provided.
Stars: ✭ 16 (-61.9%)
Mutual labels:  irc
twitchirc
Twitch Bot Development made Easier | DEPRECATED
Stars: ✭ 39 (-7.14%)
Mutual labels:  irc

Travis npm

Dependency Status devDependency Status Coverage Status License Join the chat at https://gitter.im/node-irc

node-irc is an IRC client library written in JavaScript for Node. This project is a fork of another GitHub repository.

You can access more detailed documentation for this module at Read the Docs

Installation

The easiest way to get it is via npm:

npm install irc-upd

If you want to run the latest version (i.e. later than the version available via npm) you can clone this repo, then use npm to link-install it:

npm link /path/to/your/clone

Of course, you can just clone this, and manually point at the library itself, but we really recommend using npm!

Character set detection

Character set detection was introduced to node-irc in version 0.3.8. Since then, it's had a revamp, and now uses chardet and iconv-lite. It should no longer be necessary to install local libraries to get the encoding conversion to function. However, if the libraries fail to install for whatever reason, node-irc will still install (assuming nothing else failed) and you'll be able to use it, just not the character set features.

If you install the library without the relevant dependencies at first, and later wish to enable to character set conversion functionality, simply re-run npm install.

Basic Usage

This library provides basic IRC client functionality. In the simplest case you can connect to an IRC server like so:

var irc = require('irc-upd');
var client = new irc.Client('irc.yourserver.com', 'myNick', {
    channels: ['#channel'],
});

Of course it's not much use once it's connected if that's all you have!

The client emits a large number of events that correlate to things you'd normally see in your favorite IRC client. Most likely the first one you'll want to use is:

client.addListener('message', function (from, to, message) {
    console.log(from + ' => ' + to + ': ' + message);
});

or if you're only interested in messages to the bot itself:

client.addListener('pm', function (from, message) {
    console.log(from + ' => ME: ' + message);
});

or to a particular channel:

client.addListener('message#yourchannel', function (from, message) {
    console.log(from + ' => #yourchannel: ' + message);
});

At the moment there are functions for joining:

client.join('#yourchannel yourpass');

parting:

client.part('#yourchannel');

talking:

client.say('#yourchannel', "I'm a bot!");
client.say('nonbeliever', "SRSLY, I AM!");

and many others. Check out the API documentation for a complete reference.

For any commands that there aren't methods for you can use the send() method which sends raw messages to the server:

client.send('MODE', '#yourchannel', '+o', 'yournick');

Help! - it keeps crashing!

When the client receives errors from the IRC network, it emits an "error" event. As stated in the Node JS EventEmitter documentation if you don't bind something to this error, it will cause a fatal stack trace.

The upshot of this is basically that if you bind an error handler to your client, errors will be sent there instead of crashing your program:

client.addListener('error', function(message) {
    console.log('error: ', message);
});

Further Support

Further documentation (including a complete API reference) is available in reStructuredText format in the docs/ folder of this project, or online at Read the Docs.

If you find any issues with the documentation (or the module) please send a pull request or file an issue and we'll do our best to accommodate.

You can visit us on our Gitter (found here) to discuss issues you're having with the library, pull requests, or anything else related to node-irc.

If you want to, you can connect to Gitter with your standard IRC client – instructions here.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].