An IRC driver for node.js
The driver listens for the following events, which may be emitted by the client:
The proper way to respond to a PING event from the server. Hostname is an optional argument. If you don't respond to a ping event, it's likely that your client will be automatically disconnected from the server.
"mode" (channel, set, modes, limit, user, mask)
Sets a user's mode in the channel
client.emit("mode", "#example", true, "v", null, "zipp", null);
"register" (nickname, hostname, servername)
Attempts to register your nick with the server.
Attempts to change your nickname. Will emit an error event if the nickname is taken.
"join" (channel, key)
Attempts to join a channel -- if the channel is key protected, accepts a key argument.
"leave" (channel, reason)
Attempts to leave a channel; reason argument is optional.
"kick" (channel, user, reason)
Attempts to kick a user from a channel; reason argument is optional.
client.emit("kick", "#example", "zipp", "Stop derailing chat with links to pictures of cats");
"invite" (user, channel)
Invites a user to the channel.
"topic" (channel, topic)
Attempts to set the channel's topic. Emitting the event without a topic resets the topic to the channel's name.
"msg" (user, message)
Sends a message to a user.
"notice" (user, message)
Notices a user. Noticing a user is the same as messaging except that any away or auto-responses are ignored.
Sets an away message
Clears the away message by emitting the away event without a message.
"whois" (nickname, server)
Grabs various information about the user from the server.
"say" (channel, message)
Sends a message to a channel.
Initiates a disconnection from the server. Message is optional.