
Research
Node.js Fixes AsyncLocalStorage Crash Bug That Could Take Down Production Servers
Node.js patched a crash bug where AsyncLocalStorage could cause stack overflows to bypass error handlers and terminate production servers.
Basic IRC client using irc-protocol.
irc-client makes your life easier if you're implementing anything that acts
as an IRC client by providing some common base functionality. Much of this
functionality is exposed using events like message:private or channel:join.
Read on through the API section for more information.
It's expected that one would extend the Client "class" and add their own
features on top. To that end, the core features of irc-client will remain
quite minimal.
Available via npm:
$ npm install irc-client
Or via git:
$ npm install git://github.com/deoxxa/irc-client.git
constructor
Constructs a new client object with the supplied options.
new Client([options]);
// basic instantiation
var client = new Client({
server: {
host: "127.0.0.1",
port: 6667,
},
nickname: "example",
username: "irc-client",
realname: "example client",
channels: [
"#channel",
["#example", "password-for-example"],
],
});
Arguments
Options
host and optionally port parameters. The default
is {host: "127.0.0.1", port: 6667}.[channel, password] and joined as such.join
Joins a channel, optionally calling a callback with a possible error value when complete.
client.join(channel, [password], [cb]);
client.join("#example", "example-password", function(err) {
if (err) {
console.log("couldn't join #example: " + err);
} else {
console.log("joined #example");
}
});
Arguments
part
Leaves a channel.
client.part(channel, reason);
client.part("#example", "going to sleep");
Arguments
say
Sends a message (using PRIVMSG) to a particular target.
client.say(to, text);
client.say("#channel", "good news, everyone");
// OR
client.say("friend", "hi, friend");
Arguments
ctcp
Sends a CTCP-style message to a particular target. Mostly a convenience wrapper
around .say().
client.ctcp(to, text);
client.ctcp("friend", "TIME");
Arguments
(see say() above)
notice
Sends a NOTICE message to a particular target.
client.notice(to, text);
client.notice("friend", "i'm disconnecting");
Arguments
(see say() above);
Also see example.js.
var net = require("net");
var Client = require("irc-client");
var Greeter = function Greeter() {
Client.apply(this, arguments);
this.regexes_private = [];
this.regexes_public = [];
this.on("message:public", function(from, to, message) {
this.regexes_public.filter(function(regex) {
var matches;
if (matches = regex[0].exec(message)) {
regex[1](from, to, message, matches);
}
}.bind(this));
}.bind(this));
this.on("message:private", function(from, to, message) {
this.regexes_private.filter(function(regex) {
var matches;
if (matches = regex[0].exec(message)) {
regex[1](from, to, message, matches);
}
}.bind(this));
}.bind(this));
this.transfers = [];
};
Greeter.prototype = Object.create(Client.prototype, {properties: {constructor: Greeter}});
Greeter.prototype.match_private = function match_private(regex, cb) {
this.regexes_private.push([regex, cb]);
};
Greeter.prototype.match_public = function match_public(regex, cb) {
this.regexes_public.push([regex, cb]);
};
Greeter.prototype.match = function match(regex, cb) {
this.match_private(regex, cb);
this.match_public(regex, cb);
};
var greeter = new Greeter({
server: {host: "127.0.0.1", port: 6667},
channels: ["#channel"],
});
greeter.on("irc", function(message) {
console.log(message);
});
greeter.match(/^(hey|hi|hello)/i, function(from, to, message, matches) {
var target = to;
if (target.toLowerCase() === greeter.nickname.toLowerCase()) {
target = from;
}
greeter.say(target, "no, " + matches[1] + " to YOU, " + from.nick);
});
3-clause BSD. A copy is included with the source.
FAQs
IRC client logic using irc-protocol for communication
The npm package irc-client receives a total of 1 weekly downloads. As such, irc-client popularity was classified as not popular.
We found that irc-client demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Research
Node.js patched a crash bug where AsyncLocalStorage could cause stack overflows to bypass error handlers and terminate production servers.

Research
/Security News
A malicious Chrome extension steals newly created MEXC API keys, exfiltrates them to Telegram, and enables full account takeover with trading and withdrawal rights.

Security News
CVE disclosures hit a record 48,185 in 2025, driven largely by vulnerabilities in third-party WordPress plugins.