0.0.3 • Published 12 years ago

circl v0.0.3

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

circl is a concise IRC client library for node.js. It provides almost nothing except for a basic environment to connect to an IRC server and channels, you build upon it using triggers that call functions.

Installation

npm install circl

Basic implementation:

circl = require("circl")
irc = circl.ircClient(nick, numeric-mode, [ channel1, channel2 ], host, port, log)
circl.connect()

Triggers

User specified triggers can be added by using circl.addTrigger. Here's an example of a trigger that sends a message to the console when a ping is received:

circl.addTrigger(/^PING (.+)/, function(groups) {
    console.log("Ping with message " + groups[1]);
});

Logging

When the log argument evaluates to true, transactions are logged. You can separate outgoing data from incoming data by the stream it is using; data from the client (i.e. you) is on STDERR, data from the server is on STDOUT.

0.0.3

12 years ago

0.0.2

12 years ago

0.0.1

12 years ago