IRC connection and parsing utilities module
Go to file
2022-09-25 15:20:14 +03:00
.vscode Initial commit 2022-09-23 20:38:41 +03:00
src typos 2022-09-25 11:50:30 +03:00
.gitignore add a nicklist manager class 2022-09-24 14:00:12 +03:00
.npmignore add docs to npmignore 2022-09-25 15:20:14 +03:00
.prettierrc Initial commit 2022-09-23 20:38:41 +03:00
package-lock.json add a nicklist manager class 2022-09-24 14:00:12 +03:00
package.json add README 2022-09-24 14:22:51 +03:00 more tweaks 2022-09-25 09:39:47 +03:00
tsconfig.json Initial commit 2022-09-23 20:38:41 +03:00


Zero dependencies library for creating anything using the IRC protocol - bots, clients, you name it. It includes a variety of utilities, such as a nick list class that manages mode prefixes for you, NickServ authentication checker and message formatting (colors!).

Read the Typedoc

Getting started

There is an example usage documented in src/examples/connection-test.ts, but basically you have two ways to create an IRC client connection:

  1. Use the IRCBot class. This just takes connection options and it uses IRCSocketConnector (so it will not work in the browser!)
  2. Use the IRCConnection class directly. To use this, you need to provide your own connector in addition to the options.

Connection options

The connection options are documented in detail here, but the most important are:

  • host - Server host.
  • nick - Your nickname.
  • port - Server port, defaults to 6667.
  • ssl - Use secure connection.
  • channels - String-list of channels to join on connect.


This module provides two connectors: IRCSocketConnector for Node.js usage (net and tls) and IRCWebSocketConnector for browser usage (WebSockets). You can always write your own if you need something different.

These are not included in the main module! You need to import them from @icynet/irclib/lib/connector/[..]. This is to prevent browser bundlers from including net and tls!

Event handlers

The main classes use a special custom TypedEventEmitter to send events.

Basically, you're mostly just going to need the message event for IRC.


Currently, this module only supports SASL authentication capability.