Find file
Fetching contributors…
Cannot retrieve contributors at this time
70 lines (42 sloc) 2.18 KB - IRC Client hook for IRC is a client wrapper around node-irc that provides both support for events (emitting them on IRC events and providing a API for IRC interaction) and a basic command-line interface for direct IRC interaction.


 git clone
 cd irc
 npm install
 node bin/irc

Using NPM

npm install

Hook Event Names

Event Listeners

irc::msg {dest, msg} - Sends an IRC message to the provided nick/channel.

irc::join channel - Joins the channel specified.

irc::part channel - Parts from the provided channel, or the current channel if none is specified.

irc::command string - Sends [string] as a raw IRC command.

irc::exit - Causes the hook to disconnect from IRC and exit.

Events Emitted:

irc::connected {ircNick, channels} - Emitted when IRC has finished connecting to the server.

irc::serverNotice {to, text} - Emitted when a notice is received from the IRCd.

irc::msg {nick, to, text} - Emitted when an IRC message (or pm) is received.

irc::joined {channel} - Emitted when IRC joins a channel.

irc::parted {channel} - Emitted when IRC leaves a channel.

irc::joined {channel, nick} - Emitted when a user joins a channel that IRC is part of.

irc::parted {channel, nick} - Emitted when a user leaves a channel that IRC is part of.

irc::nickChange {oldNick, newNick} - Emitted when a user changes nicks.

irc::userQuit {nick, reason, channels} - Emitted when a user quits.

irc::userKicked {channel, by, reason} - Emitted when a user is kicked from a channel that IRC is connected to.

irc::gotKicked {channel, by, reason} - Emitted when the IRC user is kicked from a channel.

Hook config.json settings

  "irc-server": "",
  "nick": "awesomebot",
  "password": "",
  "channels": ["#nodetestsu", "#nodebombrange", "#kohai"],
  "showErrors": "true",
  "userName": "hookio",
  "realName": " IRC Client",
  "idCheck": true