Permalink
Browse files

Merge branch 'chan-message' of https://github.com/whitman/node-irc in…

…to whitman-chan-message
  • Loading branch information...
martynsmith committed Nov 17, 2011
2 parents 7764063 + 7a4d6f4 commit 343fc725716c1062f4f6c81eae0199184e1942d2
Showing with 8 additions and 0 deletions.
  1. +7 −0 docs/API.rst
  2. +1 −0 lib/irc.js
View
@@ -235,6 +235,13 @@ Events
this clients nick and means a private message), or a channel (which means a
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 a channel.
+ See the `raw` event for details on the `message` object.
+
.. js:data:: 'message#channel'
`function (nick, text, message) { }`
View
@@ -360,6 +360,7 @@ function Client(server, nick, opt) {
var text = message.args[1];
self.emit('message', from, to, text, message);
if ( to.match(/^[&#]/) ) {
+ self.emit('message#', from, to, text, message);
self.emit('message' + to, from, text, message);
if ( to != to.toLowerCase() ) {
self.emit('message' + to.toLowerCase(), from, text, message);

0 comments on commit 343fc72

Please sign in to comment.