Permalink
Browse files

Merge remote-tracking branch 'martynsmith/master'

Conflicts:
	lib/irc.js
  • Loading branch information...
2 parents 6ddc50a + 02593ba commit b9d7412e3dd07db0bb6586290c9cd4c2cdc443f5 @wadey wadey committed Mar 30, 2012
Showing with 138 additions and 65 deletions.
  1. +81 −28 docs/API.rst
  2. +56 −36 lib/irc.js
  3. +1 −1 package.json
View
@@ -145,8 +145,10 @@ Events
.. js:data:: 'registered'
+ `function (message) { }`
+
Emitted when the server sends the initial 001 line, indicating you've connected
- to the server.
+ to the server. See the `raw` event for details on the `message` object.
.. js:data:: 'motd'
@@ -165,96 +167,147 @@ Events
.. js:data:: 'topic'
- `function (channel, topic, nick) { }`
+ `function (channel, topic, nick, message) { }`
Emitted when the server sends the channel topic on joining a channel, or when a
- user changes the topic on a channel.
+ user changes the topic on a channel. See the `raw` event for details on the
+ `message` object.
.. js:data:: 'join'
- `function (channel, nick) { }`
+ `function (channel, nick, message) { }`
Emitted when a user joins a channel (including when the client itself joins a
- channel).
+ channel). See the `raw` event for details on the `message` object.
.. js:data:: 'join#channel'
- `function (nick) { }`
+ `function (nick, message) { }`
- As per 'join' event but only emits for the subscribed channel
+ As per 'join' event but only emits for the subscribed channel.
+ See the `raw` event for details on the `message` object.
.. js:data:: 'part'
- `function (channel, nick, reason) { }`
+ `function (channel, nick, reason, message) { }`
Emitted when a user parts a channel (including when the client itself parts a
- channel).
+ channel). See the `raw` event for details on the `message` object.
.. js:data:: 'part#channel'
- `function (nick, reason) { }`
+ `function (nick, reason, message) { }`
- As per 'part' event but only emits for the subscribed channel
+ As per 'part' event but only emits for the subscribed channel.
+ See the `raw` event for details on the `message` object.
.. js:data:: 'quit'
- `function (nick, reason, channels) { }`
+ `function (nick, reason, channels, message) { }`
Emitted when a user disconnects from the IRC, leaving the specified array of
- channels.
+ channels. See the `raw` event for details on the `message` object.
.. js:data:: 'kick'
- `function (channel, nick, by, reason) { }`
+ `function (channel, nick, by, reason, message) { }`
- Emitted when a user is kicked from a channel.
+ Emitted when a user is kicked from a channel. See the `raw` event for details
+ on the `message` object.
.. js:data:: 'kick#channel'
- `function (nick, by, reason) { }`
+ `function (nick, by, reason, message) { }`
+
+ As per 'kick' event but only emits for the subscribed channel.
+ See the `raw` event for details on the `message` object.
+
+.. js:data:: 'kill'
- As per 'kick' event but only emits for the subscribed channel
+ `function (nick, reason, channels, message) { }`
+
+ Emitted when a user is killed from the IRC server.
+ `channels` is an array of channels the killed user was in which
+ are known to the client.
+ See the `raw` event for details on the `message` object.
.. js:data:: 'message'
- `function (nick, to, text) { }`
+ `function (nick, to, text, message) { }`
Emitted when a message is sent. `to` can be either a nick (which is most likely
this clients nick and means a private message), or a channel (which means a
- message to that channel).
+ message to that channel). See the `raw` event for details on the `message` object.
+
+.. js:data:: 'message#'
+
+ `function (nick, to, text, message) { }`
+
+ Emitted when a message is sent to any channel (i.e. exactly the same as the
+ `message` event but excluding private messages.
+ See the `raw` event for details on the `message` object.
.. js:data:: 'message#channel'
- `function (nick, text) { }`
+ `function (nick, text, message) { }`
- As per 'message' event but only emits for the subscribed channel
+ As per 'message' event but only emits for the subscribed channel.
+ See the `raw` event for details on the `message` object.
.. js:data:: 'notice'
- `function (nick, to, text) { }`
+ `function (nick, to, text, message) { }`
Emitted when a notice is sent. `to` can be either a nick (which is most likely
this clients nick and means a private message), or a channel (which means a
message to that channel). `nick` is either the senders nick or `null` which
- means that the notice comes from the server.
+ means that the notice comes from the server. See the `raw` event for details
+ on the `message` object.
.. js:data:: 'pm'
- `function (nick, text) { }`
+ `function (nick, text, message) { }`
- As per 'message' event but only emits when the message is direct to the client
+ As per 'message' event but only emits when the message is direct to the client.
+ See the `raw` event for details on the `message` object.
.. js:data:: 'nick'
- `function (oldnick, newnick, channels) { }`
+ `function (oldnick, newnick, channels, message) { }`
Emitted when a user changes nick along with the channels the user is in.
+ See the `raw` event for details on the `message` object.
.. js:data:: 'invite'
- `function (channel, from) { }`
+ `function (channel, from, message) { }`
+
+ Emitted when the client recieves an `/invite`. See the `raw` event for details
+ on the `message` object.
+
+.. js:data:: '+mode'
+
+ `function (channel, by, mode, argument, message) { }`
+
+ Emitted when a mode is added to a user or channel. `channel` is the channel
+ which the mode is being set on/in. `by` is the user setting the mode. `mode`
+ is the single character mode indentifier. If the mode is being set on a user,
+ `argument` is the nick of the user. If the mode is being set on a channel,
+ `argument` is the argument to the mode. If a channel mode doesn't have any
+ arguments, `argument` will be 'undefined'. See the `raw` event for details
+ on the `message` object.
+
+.. js:data:: '-mode'
+
+ `function (channel, by, mode, argument, message) { }`
- Emitted when the client recieves an `/invite`.
+ Emitted when a mode is removed from a user or channel. `channel` is the channel
+ which the mode is being set on/in. `by` is the user setting the mode. `mode`
+ is the single character mode indentifier. If the mode is being set on a user,
+ `argument` is the nick of the user. If the mode is being set on a channel,
+ `argument` is the argument to the mode. If a channel mode doesn't have any
+ arguments, `argument` will be 'undefined'. See the `raw` event for details
+ on the `message` object.
.. js:data:: 'whois'
Oops, something went wrong.

0 comments on commit b9d7412

Please sign in to comment.